PDA

View Full Version : how can i improve CPU utilization



Askar
22nd February 2010, 07:57
how can i improve the CPU Utilization for the specific time consuming functions (like xml parsing)

high_flyer
22nd February 2010, 08:11
By writing efficient code.
Writing efficient code is something a post on a forum can't cover.

Another thing to do is to build with the maximum level of optimization of your compiler.

There is no one answer to this.
You have to show your code, and we can then suggest how to optimize it.

pitonyak
22nd February 2010, 15:36
I agree with high_flyer, that you have not supplied sufficient information to properly answer this question. That said, if too much time is spent process XML, you have a few choices depending on the negative side effect. For example:

Move the processing to its own thread so that it does not interfere with other processing, such as the event loop.
If you simply have too much XML to process and the libraries are too slow, write your own custom parser (skeptical that this will help).

pitonyak
22nd February 2010, 15:42
Sorry, my reply was posted twice.... poking around trying to remove this specific post.