Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
gziolo
left a comment
There was a problem hiding this comment.
That makes perfect sense as proxifyContext already return the proxified version of currentValue.current 👍🏻
I'll give it a round of testing just to be on the safe side.
@vcanales, it's something that we will have to include in the upcoming Gutenberg plugin release.
proxifyContext over an already-proxified context inside the wp-context directiveproxifyContext with context proxies inside wp-context
…roxified context inside the `wp-context` directive (#65090) * Do not store the proxified context inside `currentValue.current`. * Update changelog Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
* Core Data: Fix the 'query._fields' property check inside 'getEntityRecord' resolver (#65079) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> * Site Title, Post Title: Fix typography for blocks with `a` children (#64911) * Apply styles for element + `a` child when present * Inherit styles from parent element when present * Add missing `-font-family` attribute selector * Interactivity API: Prevent calling `proxifyContext` over an already-proxified context inside the `wp-context` directive (#65090) * Do not store the proxified context inside `currentValue.current`. * Update changelog Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> --------- Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: Rafael Gallani <galani.rafael@gmail.com> Co-authored-by: David Arenas <david.arenas@automattic.com> Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>


What?
Fixes a performance regression introduced in #62734, caused by
proxifyContextbeing called over an already-proxified context repeatedly, thus increasing the number of proxies around the same context object every time awp-contextdirective was rendered.#62734
Why?
The ever-growing number of context proxies was causing the
navigate()action to become exponentially slower.The following pictures show the performance recording while clicking several times on the Next and Previous links in a Query block, before and after the changes containing the regression (#62734) are applied.
trunkat c384bb6 (before)trunkat bd9ba41 (after)How?
The fix prevents assigning to
currentValue.currentthe result of callingproxifyContext( currentValue.current, ... ). This way,proxifyContext()never receives an already-proxified context as an argument when thewp-contextdirective is rendered multiple times.Testing Instructions