Re: CPU Usage 100%

From: vipin (vipin_at_nospam.com)
Date: 07/25/04


Date: Sun, 25 Jul 2004 18:22:01 +0530

you said,it hogged the system. That means the application has gone into a
loop. Just create a debug build of app, attach the debugger and then
break,it will break, walk up the call stack and you find which function is
screwed.

thanks
vipin

"Varun Singh" <varun@nospam.net> wrote in message
news:OjFTOyLcEHA.308@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Relevant Pages

  • CPU Usage 100%
    ... Socket connection, ... the refresh timers are only initiated when the data has been ... When I start the app, ... it seems my message handling procedure and it's ...
    (microsoft.public.win32.programmer.ui)
  • CPU Usage 100%
    ... Socket connection, ... the refresh timers are only initiated when the data has been ... When I start the app, ... it seems my message handling procedure and it's ...
    (microsoft.public.win32.programmer.kernel)
  • CPU Usage 100%
    ... Socket connection, ... the refresh timers are only initiated when the data has been ... When I start the app, ... it seems my message handling procedure and it's ...
    (microsoft.public.win32.programmer.networks)
  • Re: CPU Usage 100%
    ... Just create a debug build of app, ... > the amount of data which comes down the socket. ... the refresh timers are only initiated when the data has been ... > is done in an independent hidden window (maybe this is the issue? ...
    (microsoft.public.win32.programmer.ui)
  • Re: CPU Usage 100%
    ... Just create a debug build of app, ... > the amount of data which comes down the socket. ... the refresh timers are only initiated when the data has been ... > is done in an independent hidden window (maybe this is the issue? ...
    (microsoft.public.win32.programmer.kernel)

Loading