Commit Graph

3 Commits

Author SHA1 Message Date
Levi B 0dd3a49463 Perf: Eliminate chatty virtual dispatches
This gives a speedup of approx. 20% (for overloads which take TextWriter) to 40% (for overloads which don't take TextWriter) for inputs in which at least one character requires encoding.
2015-02-12 11:44:11 -08:00
Levi B e5c6fd401f Add TextWriter-based overloads to the encoding routines
These make the core implementations slightly slower but
provide the benefit of reducing allocations, which is
useful when these methods are called frequently by Razor.
2015-02-11 17:49:37 -08:00
Levi B 1008e17259 Add HtmlEncoder, UrlEncoder, and JavaScriptStringEncoder
Also add interfaces for abstracting each of these
Unit tests are not in yet but are coming soon
2015-02-11 11:39:22 -08:00