471,348 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

Slow Debugger

Hi,

I had this problem before I reinstalled Windows XP SP2 (fully patched),
but I cant remember what I had to do to fix it :(

I have a loop which scans every pixel in a series of images. When
compiled it completes 10 images in about 6 seconds, which is acceptable
and as expected.

When i run it through VS it does about 1 frame every 10 seconds.
Obviously it should be slightly slower, but not this bad!
Ive tried turning off "edit and continue" but that doesnt make a difference.
Can anyone offer any other suggestions?

My VS setup is as default, I've not changed any other settings.

Thanks,

Regards

Andrew
Feb 7 '06 #1
14 1629
Hi,

"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:L3******************@newsfe4-gui.ntli.net...
I have a loop which scans every pixel in a series of images. When compiled
it completes 10 images in about 6 seconds, which is acceptable and as
expected.

When i run it through VS it does about 1 frame every 10 seconds. Obviously
it should be slightly slower, but not this bad!>
Ive tried turning off "edit and continue" but that doesnt make a
difference.
Can anyone offer any other suggestions?

My VS setup is as default, I've not changed any other settings.


DO you have any conditional breakpoint ?
Ctrl + ALT + B show you all your breakpoints, try to disable all

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 7 '06 #2
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
DO you have any conditional breakpoint ?
Ctrl + ALT + B show you all your breakpoints, try to disable all


No I dont have any.

Since posting I found that it was reporting something along the lines of
"another debugger is handling JIT debugging, repair VS"

So I just have, and its made no difference :(
Andrew
Feb 7 '06 #3
Hello, Andrew!

AB> Can anyone offer any other suggestions?

AB> My VS setup is as default, I've not changed any other settings.

Just a hint, maybe there are old breakpoints in the application?

( http://blogs.msdn.com/matt_pietrek/a...07/501274.aspx ) - for details

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 7 '06 #4
Vadym Stetsyak wrote:
Hello, Andrew!

AB> Can anyone offer any other suggestions?

AB> My VS setup is as default, I've not changed any other settings.

Just a hint, maybe there are old breakpoints in the application?

( http://blogs.msdn.com/matt_pietrek/a...07/501274.aspx ) - for details

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Hi,

Thanks for the advice, but I dont have any breakpoints!

I have had 2003 and C# Express installed before, and ive found a
Microsoft post about this causing problems, but ive not got any of the
symptoms they suggested.

I have uninstalled the old versions, and repaired 2k5 but it hasnt fixed
anything.

Will removing 2k5 and reinstalling make any difference or do I have to
do all of Windows again?

I've tried disabling the VS Hosting process, Ive not got any
breakpoints, Im not getting the debug to Optimise code, im not allowing
unsafe code or unmanaged debugging.

Im getting really mad with this please can someone help!!!

Thanks

Andrew
Feb 7 '06 #5
What's the size of these images, how much memory do you have available in
your system, what's the memory consumption when you run this from within VS
and from the shell?
How's the performane when running the debug build from the shell (explorer
or command line)?

Willy.
"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:ru*****************@newsfe6-gui.ntli.net...
| Vadym Stetsyak wrote:
| > Hello, Andrew!
| >
| > AB> Can anyone offer any other suggestions?
| >
| > AB> My VS setup is as default, I've not changed any other settings.
| >
| > Just a hint, maybe there are old breakpoints in the application?
| >
| > ( http://blogs.msdn.com/matt_pietrek/a...07/501274.aspx ) -
for details
| >
| > --
| > Regards, Vadym Stetsyak
| > www: http://vadmyst.blogspot.com
|
|
| Hi,
|
| Thanks for the advice, but I dont have any breakpoints!
|
| I have had 2003 and C# Express installed before, and ive found a
| Microsoft post about this causing problems, but ive not got any of the
| symptoms they suggested.
|
| I have uninstalled the old versions, and repaired 2k5 but it hasnt fixed
| anything.
|
| Will removing 2k5 and reinstalling make any difference or do I have to
| do all of Windows again?
|
| I've tried disabling the VS Hosting process, Ive not got any
| breakpoints, Im not getting the debug to Optimise code, im not allowing
| unsafe code or unmanaged debugging.
|
| Im getting really mad with this please can someone help!!!
|
| Thanks
|
| Andrew
Feb 7 '06 #6
Willy Denoyette [MVP] wrote:
What's the size of these images, how much memory do you have available in
your system, what's the memory consumption when you run this from within VS
and from the shell?
How's the performane when running the debug build from the shell (explorer
or command line)?

Willy.

Each image is 720x560.
My system has 512Mb Ram, with a 1Gb fixed page.

When running the debug .exe from the command prompt, it loads 11 images
and scans them in 6s, the memory usage goes from 19Mb to 85Mb.

When running through VS it takes 165s and the memory usage goes from 20
to 56Mb.

Can i re-iterate that this never used to happen (I haven't changed the
code), only since I reinstalled Windows XP SP2 Fully Patched and went
from C# Express 2005 Beta 2 to C# (VS) 2005.

In my current install of windows, i... Installed VS 2k5, Installed VS
2k3, uninstalled 2k3, installed C# 2k5 Express (not beta 2), uninstalled
express, repaired 2k5.

I'll reinstall windows if it will fix it, but id like to try everything
else first.


Thanks

Andrew
Feb 7 '06 #7
Ok, but that's the memory taken by your application only, right?. Can you
look at the total memory consumption when run from VS? In short, I'm trying
to be sure there is no paging happening when run from VS as I see no other
reason for the enormous slow down.
You should aslo watch the other processes CPU usage with perfmon, other
processes (also VS) should not consume (at least not visible) CPU cycles
when this application runs.

Willy.
"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:BW****************@newsfe3-gui.ntli.net...
| Willy Denoyette [MVP] wrote:
| > What's the size of these images, how much memory do you have available
in
| > your system, what's the memory consumption when you run this from within
VS
| > and from the shell?
| > How's the performane when running the debug build from the shell
(explorer
| > or command line)?
| >
| > Willy.
|
|
| Each image is 720x560.
| My system has 512Mb Ram, with a 1Gb fixed page.
|
| When running the debug .exe from the command prompt, it loads 11 images
| and scans them in 6s, the memory usage goes from 19Mb to 85Mb.
|
| When running through VS it takes 165s and the memory usage goes from 20
| to 56Mb.
|
| Can i re-iterate that this never used to happen (I haven't changed the
| code), only since I reinstalled Windows XP SP2 Fully Patched and went
| from C# Express 2005 Beta 2 to C# (VS) 2005.
|
| In my current install of windows, i... Installed VS 2k5, Installed VS
| 2k3, uninstalled 2k3, installed C# 2k5 Express (not beta 2), uninstalled
| express, repaired 2k5.
|
| I'll reinstall windows if it will fix it, but id like to try everything
| else first.
|
|
|
|
| Thanks
|
| Andrew
Feb 7 '06 #8
Willy Denoyette [MVP] wrote:
Ok, but that's the memory taken by your application only, right?. Can you
look at the total memory consumption when run from VS? In short, I'm trying
to be sure there is no paging happening when run from VS as I see no other
reason for the enormous slow down.
You should aslo watch the other processes CPU usage with perfmon, other
processes (also VS) should not consume (at least not visible) CPU cycles
when this application runs.

Willy.


When run from shell:

before opening: PF Usage is at 377MB
After opening: PF goes to 390Mb

When i click "run" in my program:
In perf mon the "% Proc Time" is at an avg of about 88 for the 6s of
running time.
the Pages/sec line is at 100 for the duration of the operation.
The average disc cue length is at about 4400 for the duration.

When run through VS:
When i start the program PF usages goes from 377 to 395 and in perfmon
the pages/sec line jumps to 90 and stays there for about 30s until it
drops off to 0.

When i click "run" there is a pagefile spike to 100 each time it loads
an image and a 5000 disc cue length. Processor usage is at 100% all the time

Is this enough information? Please tell me what else i can give you to
help diagnose this issue.

Thanks

Andrew
Feb 7 '06 #9

Scaring, the number of Pages/Sec is extremely high, that means there is
memory trashing (extreme paging).
What's the value of the Memory' 'Committed bytes' and the 'Available Bytes'
counter?
What else do you have running on this box? What are these processes
consuming in terms of committed bytes?

Willy.
"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:pA******************@newsfe7-win.ntli.net...
| Willy Denoyette [MVP] wrote:
| > Ok, but that's the memory taken by your application only, right?. Can
you
| > look at the total memory consumption when run from VS? In short, I'm
trying
| > to be sure there is no paging happening when run from VS as I see no
other
| > reason for the enormous slow down.
| > You should aslo watch the other processes CPU usage with perfmon, other
| > processes (also VS) should not consume (at least not visible) CPU cycles
| > when this application runs.
| >
| > Willy.
| >
|
|
|
| When run from shell:
|
| before opening: PF Usage is at 377MB
| After opening: PF goes to 390Mb
|
| When i click "run" in my program:
| In perf mon the "% Proc Time" is at an avg of about 88 for the 6s of
| running time.
| the Pages/sec line is at 100 for the duration of the operation.
| The average disc cue length is at about 4400 for the duration.
|
|
|
| When run through VS:
|
|
| When i start the program PF usages goes from 377 to 395 and in perfmon
| the pages/sec line jumps to 90 and stays there for about 30s until it
| drops off to 0.
|
| When i click "run" there is a pagefile spike to 100 each time it loads
| an image and a 5000 disc cue length. Processor usage is at 100% all the
time
|
| Is this enough information? Please tell me what else i can give you to
| help diagnose this issue.
|
| Thanks
|
| Andrew
Feb 7 '06 #10
Willy Denoyette [MVP] wrote:
Scaring, the number of Pages/Sec is extremely high, that means there is
memory trashing (extreme paging).
What's the value of the Memory' 'Committed bytes' and the 'Available Bytes'
counter?
What else do you have running on this box? What are these processes
consuming in terms of committed bytes?

Willy.

Hi, Not sure exactly where to find "committed bytes" but ive shown "%
committed bytes" on perfmon and it only goes up by about 2% when opening
the program, and another 2% for each image it loads.

in the alt-ctrl-del performance window it says:

Commit Charge (K)
Total: 401000 ish
Limit: 2011872
Peak: 499008

Kernel Memory(K)
Total: 59100
Paged: 35032
Nonpaged: 24068

Physical:
Total: 523760
Available: 131010 ish
System Cache: 147024

The only other thing running apart from system things is Thunderbird
in alt-ctrl-del process manager:

devenv.exe is 102Mb
thunderbird is 30meg
explorer 17meg
and loads of 1meg ish things

I usually have 100s of things open and don't experience too much paging lag.

My pagefile is on a seperate logical drive and fixed at 1.45 gig. My Ram
is 2 sticks of separately managed 256Mb. (Mobo is an Abit NF7 s V2) I
have all current platform drivers etc. This is no different to before my
windows reinstall, when i didnt have this problem.

Thanks for helping me out with this, I hope you can help me sort it :)

Regards

Andrew
Feb 7 '06 #11
Forgot to say, where it goes up by 2% each time, it starts at 20%.
Andrew
Feb 7 '06 #12
Willy Denoyette [MVP] wrote:
Scaring, the number of Pages/Sec is extremely high, that means there is
memory trashing (extreme paging).
What's the value of the Memory' 'Committed bytes' and the 'Available Bytes'
counter?
What else do you have running on this box? What are these processes
consuming in terms of committed bytes?

Willy.


Exactly the same problem occurs on my other pc.

This is a fresh xpsp2 install, default windows settings wrt
memory/paging etc.

Why is it running soooo sloooowww in development, but runs fine when
fully compiled?

:'(
Andrew
Feb 7 '06 #13
OK, I've narrowed the problem down to being the same as this:

http://forums.microsoft.com/MSDN/Sho...38755&SiteID=1

It appears to be the .getPixel method which is causing the problems with
the debugger. Ive read the above thread and all its links to everywhere
else.

http://lab.msdn.microsoft.com/produc...ID=FDBK41388#2

Ive done all 3 workarounds but none of them work.

Is there anything else i can try?
Thanks

Andrew
Feb 7 '06 #14
scroll down in the same list where you found %committed bytes, note that
"Available Bytes" is in the same list ("Memory" Performance Object). Don't
use Taskman, I prefer figures from Perfmon.
As I told you previously, your "pages/sec" counter seems too high, but now I
re-read your previous post I'm not sure what you mean with "is at 100 and
jumps to 90", what I need is the "value" in maximum and average text boxes
(labels). High values during run are an indication that hard paging happens,
and that results in bad performing applications.
So what you should do is inspect the values I gave above and watch them
before program start and while program runs.

Forget about the forum post for the moment, this is not about running in VS
vs. stand-alone.

Willy.

"Andrew Bullock" <an*********************@ANDntlworldTHIS.com> wrote in
message news:Mj****************@newsfe3-win.ntli.net...
| Willy Denoyette [MVP] wrote:
| > Scaring, the number of Pages/Sec is extremely high, that means there is
| > memory trashing (extreme paging).
| > What's the value of the Memory' 'Committed bytes' and the 'Available
Bytes'
| > counter?
| > What else do you have running on this box? What are these processes
| > consuming in terms of committed bytes?
| >
| > Willy.
| >
|
|
| Hi, Not sure exactly where to find "committed bytes" but ive shown "%
| committed bytes" on perfmon and it only goes up by about 2% when opening
| the program, and another 2% for each image it loads.
|
| in the alt-ctrl-del performance window it says:
|
| Commit Charge (K)
| Total: 401000 ish
| Limit: 2011872
| Peak: 499008
|
| Kernel Memory(K)
| Total: 59100
| Paged: 35032
| Nonpaged: 24068
|
| Physical:
| Total: 523760
| Available: 131010 ish
| System Cache: 147024
|
| The only other thing running apart from system things is Thunderbird
| in alt-ctrl-del process manager:
|
| devenv.exe is 102Mb
| thunderbird is 30meg
| explorer 17meg
| and loads of 1meg ish things
|
| I usually have 100s of things open and don't experience too much paging
lag.
|
| My pagefile is on a seperate logical drive and fixed at 1.45 gig. My Ram
| is 2 sticks of separately managed 256Mb. (Mobo is an Abit NF7 s V2) I
| have all current platform drivers etc. This is no different to before my
| windows reinstall, when i didnt have this problem.
|
| Thanks for helping me out with this, I hope you can help me sort it :)
|
| Regards
|
| Andrew
Feb 7 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael Schreiber | last post: by
1 post views Thread by Brian Henry | last post: by
7 posts views Thread by Shaji | last post: by
3 posts views Thread by Bob Graham | last post: by
6 posts views Thread by DCC-700 | last post: by
13 posts views Thread by rperreta | last post: by
7 posts views Thread by =?Utf-8?B?bGxldmk=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.