PC Review


Reply
Thread Tools Rate Thread

CPU usage too low! (with debugger attached)

 
 
Armin Zingler
Guest
Posts: n/a
 
      12th Jan 2011
Hi,

actually it's a long story.... I'm making it short:

In a loop, I'm starting three threads (as many as CPU cores).
Whenever one of the thread finishes, I'm checking if there's
more work to do the whole job. If yes, I'm starting another
thread, so there are always three threads running.

Without a debugger attached, the whole job takes 2.5 seconds.
CPU usage is 100% as expected.

With the VS debugger attached (managed debugging only), execution
time is ~6.2 seconds. There are no breakpoints set, hence I
wonder why it takes that much longer. But my main concern is
why CPU usage is only at ~60%.

With the VS debugger attached (mixed mode debugging), it takes
~45 seconds! CPU usage is only 6 - 10%! Why that? There must
be waithandles causing this. What is it waiting for,
and why only with a debugger attached? My threads can run
completely independently, so it's not an application issue.
The IDE (devenv.exe) is also not busy during the job.

I know, not a pure VB.Net question. :-/ Anyone's ever seen this
behavior?

--
Armin
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference found with debugger attached colin Microsoft C# .NET 3 5th Jan 2008 06:44 PM
Debugger Already attached, help =?Utf-8?B?SlA=?= Microsoft Dot NET Framework 13 11th Oct 2006 08:03 PM
UI Form does not update textboxes when the debugger is not attached amurra06@gmail.com Microsoft Dot NET 1 25th Apr 2006 10:23 PM
Outlook Crashes When Started With Debugger Attached David B. Bitton Microsoft Outlook Program Addins 1 11th Jun 2004 09:07 PM
Outlook Crashes When Started With Debugger Attached David B. Bitton Microsoft Outlook Interoperability 1 11th Jun 2004 09:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 AM.