Regulare Expressions VERY SLOW in .NET 2.0

J

jabbera

We have a .NET 1.1 application that used many regular expressions to
see if small stings started with certin characters. When we ported this
application to .NET 2.0 the regular expressions ran many times slower
increasing our process time from 30 seconds in 1.1 to 30 minutes in
2.0. Has anyone else experienced this problem?
 
A

Alvin Bruney - ASP.NET MVP

first i've heard of this. For your regex expressions, you may want to turn
the compiled switch on for further optimizations. In fact, if you are doing
a lot of regexing, you may benefit from declaring the regex object as a
static variable with compilation on.

--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top