You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is benign beyond very minimal page size and CSS parsing speed efficiency because repeated CSS will simply override itself, but the logic currently causes inline CSS to be output twice.
Uncached content is rendered
Scripts and styles added by the content rendering are stored
We run wp_enqueue_stored_styles() to identify what inline styles will need to be added
The inline styles changes are cached alongside the dependencies injected by the content rendering
Because at this point we merge the cached/render-generated styles back into the global store — inclusive of the inline CSS, which will then get computed again during this uncached pageview, in the footer — any such styles end up being added to ->registered['core-block-supports]->extra['after'] twice.
It's not clear to me at this stage whether there's a seam that would let us smartly deduplicate these things, since we don't probably want to do anything like "iterate over all styles after running wp_enqueue_stored_styles so we can then dedupe repeated lines"...
...However, maybe the iteration would be minimally impactful and there's a reason that this would be preferable to rendering duplicate CSS rules onto the page...? I guess we at least have a list of impacted styles so we could limit the iteration to only those.
Input welcomed.
The text was updated successfully, but these errors were encountered:
This is benign beyond very minimal page size and CSS parsing speed efficiency because repeated CSS will simply override itself, but the logic currently causes inline CSS to be output twice.
wp_enqueue_stored_styles()
to identify what inline styles will need to be addedBecause at this point we merge the cached/render-generated styles back into the global store — inclusive of the inline CSS, which will then get computed again during this uncached pageview, in the footer — any such styles end up being added to
->registered['core-block-supports]->extra['after']
twice.It's not clear to me at this stage whether there's a seam that would let us smartly deduplicate these things, since we don't probably want to do anything like "iterate over all styles after running
wp_enqueue_stored_styles
so we can then dedupe repeated lines"......However, maybe the iteration would be minimally impactful and there's a reason that this would be preferable to rendering duplicate CSS rules onto the page...? I guess we at least have a list of impacted styles so we could limit the iteration to only those.
Input welcomed.
The text was updated successfully, but these errors were encountered: