Commit Graph

5 Commits

Author SHA1 Message Date
Yves57 ed3b750ad2 Less allocations in ViewBuffer when there is only one ViewBufferPage 2016-10-07 11:25:30 -07:00
N. Taylor Mullen 55922d68d4 React to `HtmlEncodedString` rename to `HtmlString`.
- Removed the Mvc instance of `HtmlString` since it now exists in `HtmlAbstractions`.

#4558
aspnet/HtmlAbstractions#25
2016-05-17 11:02:10 -07:00
Ryan Nowak 0b7035ddcf Implement MoveTo semantics in Mvc
- Simplify things that used to rely on HtmlTextWriter. This behavior is
  now the default.

- Simplify a whole mess of Razor TextWriter code.

- Integration test for merging of TagHelper buffers back into the 'main'
  buffer.
2016-03-04 07:54:31 -08:00
Ryan Nowak 434da683fc Improve buffering of Razor output in MVC
These changes are aimed at significantly improving the performance of
MVC/Razor when a large amount of content is in play or a large number of
TagHelpers are used.

A few issues addressed:

- Buffer sync writes after a flush has occurred so that we can write them
  asyncronously. The issue is that an IHtmlContent can only do sync
  writes. This is very bad for Kestrel in general. Doing these writes
  async is better for our overall perf, and the buffer that we use for it
  is from the pool.

- 'Flatten' ViewBuffers when possible. A page with lots of TagHelpers can
  end up renting a ViewBuffer and only write 2-3 things into it. When a
  ViewBuffer sees another ViewBuffer we can either steal its pages, or
  copy data out and 'return' its pages. This lets us use 3-4 buffers for a
  large Razor page instead of hundreds.
2016-01-25 12:40:52 -08:00
Ryan Nowak 8b1bd343ba Internal cleanup in ViewFeatures 2016-01-24 22:13:29 -08:00