What would cause Windows to report 'High Power' use?

Well, if your app is busy at 100%, the task is performed as quickly as possible.
If you do a sleep() call here and there, you can lower that % value by doing it less quickly.

We had once faced such a problem with an app developed in VB6.

At that time we found out that if the display driver is configured wrongly or it of a different chipset this may happen.

In such a case ask your customer to uninstall display driver (or ask him to use this utility to install) and then restart the PC and after restarting the PC should start our software immediately after logging in.

HTH

The customer has discovered that it is much improved if they change the affinity.
Iā€™d never heard of this before.
But by forcing the app to only be able to use 4 of the coresā€¦ bingo!

To me, that sounds like the 8 core (16 processor) chip is faulty in some way.
Is there a way to make an app always use one specific core in the shortcut?
(They are launching via a batch file at the moment)

Sounds like you have a customer with more programs open than it can use at any one time. I know such customers always have issues, since a process time slice may become less with more processes in the same core as your xojo app. Setting the affinity is not a solution. Tell users to have only apps open they do use or have a setting to lower the thread priorityies (in your app) if you have any threads. This is not required on mac since macos manages this struff way better than windows.

If itā€™s 8-cores it could be that the user never reboots the system or too much processes remain on the same core.

1 Like

I suspect that too.

In fact, before creating the application, I close all running software, shut down the computer, wait a minute or so, then ā€¦
Boot the Computer,
Fire Xojo AND ONLY XOJO,

Generate the Application,
then make some tests (just to be sure the newly created application works fine).

BTW: I forgot to say that I do not have any fancy addition(s) in my boot disk.

1 Like

or too much processes remain on the same core.

The task manager list I saw didnt appear to show other heavy apps.
But I wouldnt be surprised to find everything on one coreā€¦

The error about writing to the log is interesting. Could it be that the error to create or deal with the log file is also triggering an attempt to write to the log which triggers another error and so on and so forth? Something is different there which is causing you to loop through something you donā€™t normally loop through given that this is 1 in 100 people. Youā€™ll need to provide some debugging for the users with this problem. I sometimes do a special hidden log window or something similar that I can give them a secret preference to open or something that would show the log lines before trying to write them to disk. Something that might give you some more info on what is throwing so many errors or changing some other situation to something you never imagined would actually happen :wink:

1 Like

Windows 10 Home and Pro editions have some weird behaviours with high core and hyper thread counts. Itā€™s a feature of the MS hobbling strategy to justify the Workstation and Server edition price premiums.

Check the socket count in Task Manger - It should report 1. Try disabling hyper-threading in the BIOS.

Or upgrade to Linux :grin:

It occurred to me today, watching Xojo go beserk while I am just opening a project, that no matter what i code, I may be up against Xojoā€™s own behaviour in Windows.
When this happens, I can watch handles get allocated at a rate of knots while it hogs the entire CPU.

This grab is within a VM.

Next step: do this while within the IDE either running the debugger on windows, or remote debugging from Mac to windows

Also - I see the VM you are using has 1 CPU. Iā€™ve seen weird behavior with 1CPU VMs on Windows before - be sure to test in a 2CPU VM as well.

1 Like

Not weird at all, 1500+ threads for 1VCPU should give you 110% of use if the max wasnā€™t 100% :grinning_face_with_smiling_eyes:

Doesnā€™t happen when running in debug mode, or I wouldnā€™t ever ship my product for shame.
Happens with Xojo IDE quite often, seems to be related to having maybe 6 or more tabs open when the project was saved.

Maybe Iā€™ll send a compiled app with profiling turned on to some problem customers.