Re: Console.Writeline in release builds a performance issue ?
- From: "Sagaert Johan" <REMOVEsagaert_j@xxxxxxxxxxx>
- Date: Wed, 23 Nov 2005 16:45:27 +0100
Thanks
"Mark R. Dawson" <MarkRDawson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:35E1FFAE-5DFD-4510-89B2-D3C76CDC2583@xxxxxxxxxxxxxxxx
> An easier way rather than putting lots of #if DEBUG all over your code is
to
> use either the:
>
> System.Diagnostics.Debug.WriteLine or
> System.Diagnostics.Trace.WriteLine methods
>
> When in debug mode both Trace and Debug will output, when in release only
> trace will output, unless you remove the TRACE symbol from you compiler
> options.
>
> Hope that helps.
> Mark R Dawson
> http://www.markdawson.org
>
>
>
>
> "vooose" wrote:
>
> > The short answer is I don't know. But why dont you try looping over 1
> > million times doing Console.Writeline and see how long it takes. If it
> > takes 1 second or less (dont run it under debug mode) then theres really
> > no point going round commenting out all the references in your code.
> >
> > Instead, why not define a DEBUG symbol and only include it in debug
> > builds. eg
> > #if DEBUG
> > Console.Writeline("This is a debug only statement");
> >
> > --
> > Wal
> > http://www.vooose.com
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> >
.
- References:
- Console.Writeline in release builds a performance issue ?
- From: Sagaert Johan
- Re: Console.Writeline in release builds a performance issue ?
- From: vooose
- Console.Writeline in release builds a performance issue ?
- Prev by Date: Re: Progress bar causes application lockup
- Next by Date: binding datacolumn to another datacolumn in a datagrid
- Previous by thread: Re: Console.Writeline in release builds a performance issue ?
- Next by thread: Re: Console.Writeline in release builds a performance issue ?
- Index(es):
Relevant Pages
|