Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 313939

Move replacing of placeholders from HtmlRenderer to HtmlResponseAttachmentsProcessor

$
0
0

Problem/Motivation

#2478483: Introduce placeholders (#lazy_builder) to replace #post_render_cache introduced the concept of "placeholders". It allowed us to remove #post_render_cache, and all the special handling for that, and just have placeholders be another type of attachment. So, we now have #attached[placeholders].

Because placeholders are an attachment, they should be handled in a HtmlResponseAttachmentsProcessor, which specifically is the place that takes attachments and ensures the HtmlResponse is updated accordingly.

(This issue & code originate from #2429617: Make D8 2x as fast: SmartCache: context-dependent page caching (for *all* users!). This blocks that issue, as well as #2349011: Implement placeholder based-rendering strategies to support SingleFlush, BigPipe, ESI….)

Proposed resolution

Make it so.

Remaining tasks

Review.

User interface changes

None.

API changes

None.

But, notable change:
HtmlResponseAttachmentsProcessor now renders the attached placeholders (#attached[placeholders]). Which means finally all attachments are truly processed in the AttachmentsResponseProcessorInterface implementation for HTML responses.
This means HtmlRenderer no longer needs to render attached placeholders. Which means HtmlResponse objects are now perfectly cacheable, because they don't contain anything user-specific.

(This is not an API change, just an implementation detail change.)

Data model changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryTask because not broken, but an important improvement.
Issue priorityMajor because it blocks significant other issues.
Prioritized changesThe main goal of this issue is performance/cacheability.
DisruptionZero disruption.

Viewing all articles
Browse latest Browse all 313939

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>