(01-16-2023, 12:58 PM)SMcNeill Wrote: I tried to reproduce this type of behavior with a version of Linux Mint, run via a VMware virtual machine, but I couldn't get it to idle with any real CPU usage. Is there something specific in the code you're running, which might contribute to the difference? Does it have several $INCLUDE files? Rely on several DECLARE LIBRARY calls? Is it a long set of code, such as the qb64pe.bas file itself?
Usually such issues are nothing more than an endless loop without any sort of limit or delay in them. They run over and over and over, without pausing to let the CPU share resources with other processes like it should. The only issue is figuring out *where* in the vast sea of code that is qb64pe, one of these endless loops might be hiding. Any further details, or test code, which you can share, will help us try to pinpoint exactly what to be digging into for the issue.
I am using Mint 21.1 with Cinnamon on a Proxmox Server.
The VM has 4GB Ram, 64GB SDD, 4 Cores
Just starting QB64PE takes the CPU up to 70% before loading the .bas file
The code is below.
I will try another VM and report back.
Thx!
Code: (Select All)
Input "Day : "; d$
Input "Month: "; m$
Input "Year : "; y$
d = Val(d$)
m = Val(m$)
y = Val(y$)
m = (m + 9) Mod 12
y = y - m / 10
weekday = Zeller(d, m, y)
Restore DataDayKey
For X = 1 To 7
Read dKey$(X)
Next X
Print "Week Day = ", dKey$(weekday)
End
DataDayKey:
Data "Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"
Function Zeller (d, m, y)
Dim t1, t2, t3, t4
If month < 3 Then
y = y - 1
m = m + 12
End If
t1 = Int(((m + 1) * 26) / 10)
t2 = Int(y / 4)
t3 = Int(y / 100)
t4 = Int(y / 400)
Zeller = (d + t1 + y + t2 + 6 * t3 + t4) Mod 7
End Function