PDA

View Full Version : High CPU Utilization



navi1084
10th July 2009, 07:31
Dear All,
I am experimenting on a project which is connected to a camera by means of QTcpSocket. My program is to send a request for an image to camera and after receiving, process it and send another request.
The problem is in terms of CPU Utilization. My program takes 40 - 50% of CPU to execute. Is this deafault behaviour or is there any way to fix this issue so that program takes less CPU.

Ginsengelf
10th July 2009, 08:26
Hi, could you post some code, especially for the image processing part? (I'm just guessing that that's the most time consuming part, use a profiler to find out where the program really spends its time)

Ginsengelf

navi1084
10th July 2009, 08:34
Precessing in the sense I am just displaying the image and as per the user perameter changing the image. example if user press b/w conversion then image will be converted into black and white.

even i have checked a Qt example affine in Qt\Demo\. If you run this appliaction atleast it will consume 25% of CPU. and on user action such as rotating etc it will consume 40 - 45%

nish
10th July 2009, 09:06
so does your application continuously uses the cpu or just at image processing?

wysota
10th July 2009, 10:37
Can we just see the code? :) Or better yet, output from a profiler - this will tell you immediately what eats up most of the cpu.