Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Add support for flush points in Razor pages #1042

@pranavkm

Description

@pranavkm

By default Razor pages buffer output in memory. This is required for the a view is rendered - first a page is executed, the page specifies the Layout and additionally sets up properties in the ViewBag \ ViewData that the Layout would consume (page title, sections etc). Consequently, no byte is written to the output until the entire page is rendered.

Flush points would allow for switching to directly writing to the output when we encounter a invocation

<- Buffered section -->
<html>  
<head>
   <link type="text/css" href="bootstrap.css" />
   <title>@Page.Title</title>
</head>
<-- Flush buffered content to response and no longer buffer content -->
@FlushAsync() 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions