I have probably a stupid question and didn't find a proper place where to put it.
I have made some observation of my apps running on Linux (Ubuntu and Debian) and found out that even if I compile an application consisting just of an empty window, it takes approx. 5% of CPU all the time it is running (no matter if it's minimized or not). It also takes a bit more if it's focused.
I didn't encounter such issue (if this could be considered an issue ) on same upp application compiled on Win XP.
Also an reference "empty window application" done in QT4 on the same linux instance doesn't "eat" CPU at all. It's 0% unless you start moving the window or moving and clicking the mouse over the window.
Did anyone encounter this? Should this be considered as feature/error or is something wrong with my X? (I can't imagine how it would be to run concurrently e.g. 10 apps created by upp on such linux machine)
tojocky Messages: 607 Registered: April 2008 Location: UK
Contributor
Hello!
It is not true!
I compiled GoogleTranslatorDemo from bazaar that uses global shortcut with scanning in every 0.1 second the keyboard and it works perfectly an eat 0% on running.
I use Ubuntu 9.10.
Regards, Ion Lupascu (tojocky).
lokki wrote on Thu, 01 April 2010 15:09
Hello,
I have probably a stupid question and didn't find a proper place where to put it.
I have made some observation of my apps running on Linux (Ubuntu and Debian) and found out that even if I compile an application consisting just of an empty window, it takes approx. 5% of CPU all the time it is running (no matter if it's minimized or not). It also takes a bit more if it's focused.
I didn't encounter such issue (if this could be considered an issue ) on same upp application compiled on Win XP.
Also an reference "empty window application" done in QT4 on the same linux instance doesn't "eat" CPU at all. It's 0% unless you start moving the window or moving and clicking the mouse over the window.
Did anyone encounter this? Should this be considered as feature/error or is something wrong with my X? (I can't imagine how it would be to run concurrently e.g. 10 apps created by upp on such linux machine)
I have made some observation of my apps running on Linux (Ubuntu and Debian) and found out that even if I compile an application consisting just of an empty window, it takes approx. 5% of CPU all the time it is running (no matter if it's minimized or not). It also takes a bit more if it's focused.
It is possible. The reason is that we are doing some stuff each 20ms. But it is the same in Win32.
nlneilson Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
Contributor
That is odd your CPU usage is higher.
You should be able to open several instances of your app.
I just opened 20 instances of an app made with Upp http://www.nlneilson.com/apps/Distance.exe
All for 20 instances
dual core - Intel
1~2% CPU, the same as if they were not opened on Vista.
On Ubuntu 10.04b it's ~30% but that is an .exe opened with Wine.
single core - AMD
XP 0%
Ubuntu 9.10 ~20% with Wine but ~10% with none opened.
Mindtraveller Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
Experienced Contributor
luzr wrote on Fri, 02 April 2010 12:37
we are doing some stuff each 20ms.
Is it all about posting callbacks and timers? If it is so, is there a possibility to disable this thing (i.e. if I want to switch to MtAlt instead of doing some job each 20 ms)?
Is it all about posting callbacks and timers? If it is so, is there a possibility to disable this thing (i.e. if I want to switch to MtAlt instead of doing some job each 20 ms)?
Unlikely - most of it is cursor animation, tooltip checking etc... Things that are not possible to be done any other way.