aspnetcore/test
Ryan Nowak ff944e5948 Fix for Razor #84 - Optimize GetSourceLocation
GetSourceLocation is frequently called to determine the location mappings
between the original document and the generated code.

The old implementation did a number of ToString and replace operations to
simplify the math on tracking the position - which put it front and center
in our performance measurements - about 25% of all execution time in a
sampling profile of our perf test.

The new code tracks position as code is written, and avoids allocations.
After these changes GetSourceLocation doesn't show up in the profile.
2014-08-20 13:22:23 -07:00
..
Microsoft.AspNet.Razor.Test Fix for Razor #84 - Optimize GetSourceLocation 2014-08-20 13:22:23 -07:00