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

Make TagHelperOutput lazy initialize TagHelperContent properties. #358

Closed
NTaylorMullen opened this issue Apr 14, 2015 · 7 comments
Closed
Assignees
Milestone

Comments

@NTaylorMullen
Copy link
Member

The initial implementations of the "new" TagHelperOutput data structure (one with buffers instead of strings) was originally lazy with the buffers construction but was then removed due to the added complexity via code review. We should analyze its perf impact to determine if being lazy about construction of PreElement, PreContent, Content, PostContent and PostElement's TagHelperContent objects is beneficiary.

@danroth27 danroth27 added this to the 4.0.0-beta5 milestone Apr 14, 2015
@NTaylorMullen NTaylorMullen modified the milestones: 4.0.0-beta6, 4.0.0-beta5 May 13, 2015
@Eilon Eilon modified the milestones: 4.0.0-beta6, 4.0.0-beta7 Jun 29, 2015
@Eilon Eilon assigned sornaks and unassigned NTaylorMullen Aug 12, 2015
@Eilon
Copy link
Member

Eilon commented Aug 12, 2015

Please see #317 for additional info.

@Eilon Eilon modified the milestones: 4.0.0-beta8, 4.0.0-beta7 Aug 13, 2015
@Eilon Eilon modified the milestones: 4.0.0-beta8, 4.0.0-rc1 Sep 24, 2015
@Eilon Eilon modified the milestones: 4.0.0-rc1, 4.0.0-rc2 Oct 22, 2015
@Eilon
Copy link
Member

Eilon commented Oct 30, 2015

Please have a chat with @rynowak before starting the perf investigation.

@rynowak
Copy link
Member

rynowak commented Oct 30, 2015

beneficiary

Yes. Let's discuss

@Eilon
Copy link
Member

Eilon commented Oct 30, 2015

Hah!

@rynowak
Copy link
Member

rynowak commented Nov 10, 2015

Let's discuss
image

This is definitely worth addressing

@NTaylorMullen
Copy link
Member Author

Upon investigating a proper fix for this issue I decided to investigate what it'd take to have TagHelperOutput be an IHtmlContent (since it's responsible for lazily initializing buffers). After a lot of playing around with the idea and talks with @DamianEdwards it definitely fits.

This will also involve removing the WriteTagHelperAsync method from Mvc.

NTaylorMullen added a commit that referenced this issue Nov 13, 2015
- This allows users to write `TagHelperOutput` directly to an `IHtmlContent` accepting `TextWriter`.
- This also enables us to inspect backing fields for all of the various contents to lazily initialize them.

#358
NTaylorMullen added a commit that referenced this issue Nov 13, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit that referenced this issue Nov 13, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit to aspnet/Mvc that referenced this issue Nov 18, 2015
- Removed `WriteTagHelperAsync` methods from `RazorPage`.
- Moved `WriteTagHelperAsync` tests into Razor since `TagHelperOutput` is now an `IHtmlContent`.
- Updated code generation test files.

aspnet/Razor#358
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
- This allows users to write `TagHelperOutput` directly to an `IHtmlContent` accepting `TextWriter`.
- This also enables us to inspect backing fields for all of the various contents to lazily initialize them.

#358
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
- This allows users to write `TagHelperOutput` directly to an `IHtmlContent` accepting `TextWriter`.
- This also enables us to inspect backing fields for all of the various contents to lazily initialize them.

#358
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit that referenced this issue Nov 18, 2015
NTaylorMullen added a commit to aspnet/Mvc that referenced this issue Nov 19, 2015
- Removed `WriteTagHelperAsync` methods from `RazorPage`.
- Moved `WriteTagHelperAsync` tests into Razor since `TagHelperOutput` is now an `IHtmlContent`.
- Updated code generation test files.

aspnet/Razor#358
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
- This allows users to write `TagHelperOutput` directly to an `IHtmlContent` accepting `TextWriter`.
- This also enables us to inspect backing fields for all of the various contents to lazily initialize them.

#358
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
- This allows users to write `TagHelperOutput` directly to an `IHtmlContent` accepting `TextWriter`.
- This also enables us to inspect backing fields for all of the various contents to lazily initialize them.

#358
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
- Added backing fields to each of the content properties and added null propagation checks throughout the class.

#358
NTaylorMullen added a commit that referenced this issue Nov 20, 2015
NTaylorMullen added a commit to aspnet/Mvc that referenced this issue Nov 20, 2015
- Removed `WriteTagHelperAsync` methods from `RazorPage`.
- Moved `WriteTagHelperAsync` tests into Razor since `TagHelperOutput` is now an `IHtmlContent`.
- Updated code generation test files.

aspnet/Razor#358
NTaylorMullen added a commit to aspnet/Mvc that referenced this issue Nov 20, 2015
- Removed `WriteTagHelperAsync` methods from `RazorPage`.
- Moved `WriteTagHelperAsync` tests into Razor since `TagHelperOutput` is now an `IHtmlContent`.
- Updated code generation test files.

aspnet/Razor#358
@NTaylorMullen
Copy link
Member Author

@NTaylorMullen NTaylorMullen changed the title Analyze performance impact of TagHelperContent not being lazy on TagHelperOutput properties. Make TagHelperOutput lazy initialize TagHelperContent properties. Nov 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants