Skip to content

FormatterExpression Optimization#152

Closed
cjberg wants to merge 2 commits intoLuckyPennySoftware:masterfrom
cjberg:FormatterExpression-Optimization-Nov27
Closed

FormatterExpression Optimization#152
cjberg wants to merge 2 commits intoLuckyPennySoftware:masterfrom
cjberg:FormatterExpression-Optimization-Nov27

Conversation

@cjberg
Copy link
Contributor

@cjberg cjberg commented Nov 28, 2011

I noticed my web application spent four seconds creating mappings at start-up. Most of the time was used by Regex.Replace calls in FormatterExpression. I looked at the source and realized that the use of Regex.Replace was quite unnecessary and expensive, considering how simple the transformations were. By replacing all regexes with simpler string functions, the start-up time was cut to a quarter, down from four to about one second.

I hope you want to accept this pull request, since it does make a significant difference, without making the code more complex. All tests pass, of course.

…ls with basic string manipulations (Regex was unnecessary and expensive).
@jbogard jbogard closed this in 9b7c7c6 Dec 11, 2011
@lock
Copy link

lock bot commented May 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants