CPU Usage 100%
From: Varun Singh (varun_at_nospam.net)
Date: 07/23/04
- Next message: John Carson: "Re: GroupBox Caption Size"
- Previous message: vipin: "Re: GroupBox Caption Size"
- Next in thread: Arkady Frenkel: "Re: CPU Usage 100%"
- Reply: Arkady Frenkel: "Re: CPU Usage 100%"
- Reply: vipin: "Re: CPU Usage 100%"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Jul 2004 19:24:15 +0530
Hi there,
I am assuming this must be a common problem. I have an
application (Built in VC++ 6.0 on Win2K) which connects to a server and
downloads binary data which is parsed to draw images. The app contains a
Socket connection (Winsock 1.1, Async Handling of Connect, Close and Reads),
timers which refresh the backbuffer every 20 Milliseconds and blit the
buffer to the Window DC and an Idle Foreground Hook for my thread which does
some other calculation tasks. The parsing of the drawing data is handled
within the refresh timers too. It can end up taking some time depending on
the amount of data which comes down the socket.
Now, the refresh timers are only initiated when the data has been
parsed, they are not continuously running. When I start the app, the CPU
usage hovers around 3% to 10% ... this is with all activity in full swing
(socket I/O, redraws, idle tasks, etc.) ... this climbs up to around 40% to
50% after about 5 minutes of running time. If the app is left running for
long, then the CPU usage for my app climbs up to 100% even if the socket is
closed and no refreshes are taking place. The Idle timers are not active
either. It stays that way until app shutdown. Why would this be happening
when I have no functionality occurring?
When I profile the app, it seems my message handling procedure and it's
child functions take the most time as expected; the socket message handling
is done in an independent hidden window (maybe this is the issue? Two
windows and their message handlers?) ... where could the issue be? If I
haven't provided enough information, please let me know.
All input will be greatly appreciated.
Regards,
Varun
- Next message: John Carson: "Re: GroupBox Caption Size"
- Previous message: vipin: "Re: GroupBox Caption Size"
- Next in thread: Arkady Frenkel: "Re: CPU Usage 100%"
- Reply: Arkady Frenkel: "Re: CPU Usage 100%"
- Reply: vipin: "Re: CPU Usage 100%"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|