News

Locations of visitors to this page
    To Do: Blog 1000

Slow Regex Performance on 64-Bit .NET Framework 2.0

This is from the BCL Team Blog:

Developers using System.Text.RegularExpressions.Regex with the RegexOptions.Compiled flag may notice performance degradation in their 2.0 apps when running on 64-Bit .NET Framework 2.0.

The performance problem occurs in the Regex(String pattern, RegexOptions options) constructor when instantiating very large, un-optimized regular expressions and while specifying the RegexOptions.Compiled flag

There is a hotfix available here, and the hotfix will be rolled into .NET Framework 2.0 SP 1.

The blog post also suggests some workarounds:

  • Reduce the Regular Expression Pattern

  • Use Regex Pre-Compilation Instead of Compiling-on-the-Fly

  • Remove the RegexOptions.Compiled Flag From Your Code

Friday, May 25, 2007 8:49 AM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: