02-18-2025, 05:42 PM
I... have no idea what the BLEEP you're talking about.
I run this and it uses 0.1% CPU.
I hit any key (except ESC which ends the program) and start using hardware images. I use... 0.1% CPU.
There's almost no CPU usage at all here....
So, to test something else, I turn off the _LIMIT and remark it out.
I run this with no limit and, like expected, it goes high with CPU usage being in an endless loop -- 9% CPU.
I then hit any key (again, except ESC) and the hardware image goes into play -- 11% CPU.
Even in a limitless loop, the addition of hardware images only increases my CPU usage by 2%. That's hardly an issue.
I've seen you mention several times about "hardware images uses a lot of CPU", but I've never noticed that. Do you got some code examples of the issue? Is it something you're doing different than what I'm doing here?
Share the simplest set of code that you can, that might highlight the issue. This is about as simple of a toggle as I can think of for testing -- one is NO HARDWARE, hit a key and then the other IS HARDWARE. And I'm just not seeing any real CPU usage either way here, when a reasonable _Limit is in place. Even without a limit, the increase is... 2-3% more perhaps?
It's generally not enough to make my fans turn on and sound like an airplane engine. Whenever THAT happens, then I *know* I'm straining the CPU.
Code: (Select All)
tempScreen = _NewImage(640, 400, 32)
Cls , &HFFFF0000, tempScreen
hardwareScreen = _CopyImage(tempScreen, 33)
Do
Cls
k = _KeyHit
Select Case k
Case 27: System
Case Is > 27: toggle = Not toggle
End Select
If toggle Then _PutImage (0, 0)-(640, 400), hardwareScreen
_Display
_Limit 30
Loop
I run this and it uses 0.1% CPU.
I hit any key (except ESC which ends the program) and start using hardware images. I use... 0.1% CPU.
There's almost no CPU usage at all here....
So, to test something else, I turn off the _LIMIT and remark it out.
I run this with no limit and, like expected, it goes high with CPU usage being in an endless loop -- 9% CPU.
I then hit any key (again, except ESC) and the hardware image goes into play -- 11% CPU.
Even in a limitless loop, the addition of hardware images only increases my CPU usage by 2%. That's hardly an issue.
I've seen you mention several times about "hardware images uses a lot of CPU", but I've never noticed that. Do you got some code examples of the issue? Is it something you're doing different than what I'm doing here?
Share the simplest set of code that you can, that might highlight the issue. This is about as simple of a toggle as I can think of for testing -- one is NO HARDWARE, hit a key and then the other IS HARDWARE. And I'm just not seeing any real CPU usage either way here, when a reasonable _Limit is in place. Even without a limit, the increase is... 2-3% more perhaps?
It's generally not enough to make my fans turn on and sound like an airplane engine. Whenever THAT happens, then I *know* I'm straining the CPU.
