Re: Cleaning data - performance issue
- From: Jesper Stocholm <j@xxxxxxxxxxxxxxxx>
- Date: Tue, 04 Apr 2006 03:25:07 -0700
"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in news:OpbU0XqVGHA.4900@xxxxxxxxxxxxxxxxxxxx:
Another thing here, an internal RegEx object is being created
through
every iteration of the loop. The OP would see much better performance
by creating one RegEx instance and setting the options on it to do a
pre-compile of the expression. The performance would probably
increase dramatically.
Hi guys,
I did as suggested and moved the parsing of chars outside the method itself
and I now pass this as a parameter. Also I have skipped the check on
StringBuilder.Length, since it was basically not needed.
The method now works as intended and memory consumption is moderate.
Thanks for your input.
:o)
--
Jesper Stocholm
http://stocholm.dk
Hvor køber du slik, cola eller smøger online?
Send linket til mig via http://ekiosk.dk
.
- References:
- Cleaning data - performance issue
- From: Jesper Stocholm
- Re: Cleaning data - performance issue
- From: Jon Skeet [C# MVP]
- Re: Cleaning data - performance issue
- From: Nicholas Paldino [.NET/C# MVP]
- Cleaning data - performance issue
- Prev by Date: Constructor call constructor
- Next by Date: Re: Remoting - Is server running?
- Previous by thread: Re: Cleaning data - performance issue
- Next by thread: Downloader
- Index(es):
Relevant Pages
|