I have this loop
// go through each alumni (esdl This run often comes almost instantly. When I figured it out in a trace or debug statement ... foreach (esdl.Alumni currAlumnis in Alomony) {... same loop logic trace. WrititeLine ("hi"); Trace.Indent (); Trace.WriteLine ("Written ");} This makes things very slow for both trace or debug
Why is it?
Edit - a On the tests I have found that trace.Interior makes it very slow. But only if there is a written line, there is a considerable decrease in performance. What is wrong with the indent method?
Anybody is likely to be the amount of debugging slow down your program, even running at one-tenth speed Talk to your audience (no one else sees you) and both the default listener Send message to, which it calls debugger Logs both in and Win32 output debugging . - A little surprise makes it a little slower: -) Why can the index have a big effect, do not you actually spread anywhere else in that loop? If you are not, and you have 2000 items (according to your comment), then there is going to be a lot of space on the front of each line as you reach the end (the average possibility of 1000 indents per line is problematic ).
Comments
Post a Comment