Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Upp application and CPU on Linux
Upp application and CPU on Linux [message #26104] Thu, 01 April 2010 14:09 Go to next message
lokki is currently offline  lokki
Messages: 20
Registered: November 2005
Promising Member
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 Smile) 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)

Thanks.

Edit: this is not April joke Smile

[Updated on: Thu, 01 April 2010 15:17]

Report message to a moderator

Re: Upp application and CPU on Linux [message #26113 is a reply to message #26104] Thu, 01 April 2010 20:22 Go to previous messageGo to next message
tojocky is currently offline  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 Smile) 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)

Thanks.

Edit: this is not April joke Smile

Re: Upp application and CPU on Linux [message #26120 is a reply to message #26104] Fri, 02 April 2010 10:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
lokki wrote on Thu, 01 April 2010 08:09


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.
Re: Upp application and CPU on Linux [message #26129 is a reply to message #26120] Sat, 03 April 2010 21:20 Go to previous messageGo to next message
nlneilson is currently offline  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.

[Updated on: Sat, 03 April 2010 22:33]

Report message to a moderator

Re: Upp application and CPU on Linux [message #26201 is a reply to message #26120] Mon, 12 April 2010 16:30 Go to previous messageGo to next message
Mindtraveller is currently offline  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)?
Re: Upp application and CPU on Linux [message #26204 is a reply to message #26201] Mon, 12 April 2010 18:50 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Mon, 12 April 2010 10:30

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)?



Unlikely - most of it is cursor animation, tooltip checking etc... Things that are not possible to be done any other way.

That said, involved code is really minimal.
Previous Topic: Sharing and Locking
Next Topic: Back to coding
Goto Forum:
  


Current Time: Thu Apr 18 18:55:18 CEST 2024

Total time taken to generate the page: 0.02261 seconds