-
Notifications
You must be signed in to change notification settings - Fork 822
Blocks: In scan_delimiters extract static method #43984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocks: In scan_delimiters extract static method #43984
Conversation
Ports 185482-ghe-Automattic/wpcom When `scan_delimiters()` is attempting to find the end of an HTML comment, it’s calling a convenience method which is also a closure in the code (or an anonymous function). This carries a marginal performance overhead and limits reuse. In this change that method is extracted onto the class as its own static method; this should simplify reasoning about the method itself and provide a perofmrnace lift to the calling code.
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
* Getting chart data * Updating chart and data transformation * Implement interactive stats chart with clickable metric tabs and single-series visualization * Fixing Stats card tab styling * Fixing Stats card tab CSS and label position * changelog * Added new card style for Stats in My Jetpack * Empty data notification * Empty data notification styling * Adding charts package again * Updating CSS after review, adding click redirect * pnpm lock update * script changes * Social Previews: Fix Mastodon preview stretching (#44019) * Fix Mastodon description overflow with previews * changelog * Lockfile * Bump to 12 * Admin Menu: Add "Dashboard > Updates" screen to Simple sites (#44024) * Admin Menu: Add "Dashboard > Updates" menu to Simple sites * Remove WP version * Add changelog * Exclude VIP sites, since the plugins (and their updates) are managed a little bit differently there, and parity with Atomic sites is also not important for them. * Check that function exists * Zendesk: Add CSAT endpoint (#44029) * Blocks: In scan_delimiters extract static method (#43984) Ports 185482-ghe-Automattic/wpcom When `scan_delimiters()` is attempting to find the end of an HTML comment, it’s calling a convenience method which is also a closure in the code (or an anonymous function). This carries a marginal performance overhead and limits reuse. In this change that method is extracted onto the class as its own static method; this should simplify reasoning about the method itself and provide a perofmrnace lift to the calling code. Co-authored-by: Dennis Snell <[email protected]> Co-authored-by: Brandon Kraft <[email protected]> * WordAds: Remove package from monorepo (#44025) * Fix test description * Delete packages/wordads * Add changelog * Fix project lint issues * Subscriptions: fix subcriber stats links when stats module is not active (#44037) * Subscriber dashboard: pass stats module status to JS We will use it to change some of the links when the module is not active. * Add extra space for better readability * Pass new prop to newsletter component * Use new prop to change the status of the links - On WordPress.com sites, always link to WordPress.com. - On self-hosted sites, check for the status of the Stats module: * If it's active, link to the wp-admin stats page. * If it is not active, link to the Jetpack cloud subscribers page. * Update test accordingly * Update dashboard links to be aware of stats module status * Add changelog * Redirect folks to Calypso blue stats when stats module is inactive This is now possible because the Subscribers stats sub-page of the Calypso blue stats is not accessible, even when you do not use the Stats module. See pejTkB-24B-p2 * simplify internal link logic See https://github.com/Automattic/jetpack/pull/44037/files#r2158706216 * Update doc comment * Be more explicit about stats being enabled in original test See #44037 (comment) Co-authored-by: Allison Levine <[email protected]> --------- Co-authored-by: Tony Arcangelini <[email protected]> Co-authored-by: Allison Levine <[email protected]> * Update dependency copy-webpack-plugin to v13 (#44040) Co-authored-by: Renovate Bot <[email protected]> * fixing package dependency * Update margin-inline-end Co-authored-by: Manzoor Wani <[email protected]> * Revert "fixing package dependency" This reverts commit b592fd9. * Charts webpack fix * changelog * Fixing timezones to match Stats and hiding 0 diff values for catds --------- Co-authored-by: Gergely Márk Juhász <[email protected]> Co-authored-by: Miguel Torres <[email protected]> Co-authored-by: Kosta <[email protected]> Co-authored-by: Jeremy Herve <[email protected]> Co-authored-by: Dennis Snell <[email protected]> Co-authored-by: Brandon Kraft <[email protected]> Co-authored-by: tbradsha <[email protected]> Co-authored-by: Tony Arcangelini <[email protected]> Co-authored-by: Allison Levine <[email protected]> Co-authored-by: Automattic Bot <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Manzoor Wani <[email protected]>
Ports 185482-ghe-Automattic/wpcom
Proposed changes:
When
scan_delimiters()
is attempting to find the end of an HTMLcomment, it’s calling a convenience method which is also a closure
in the code (or an anonymous function). This carries a marginal
performance overhead and limits reuse.
In this change that method is extracted onto the class as its own static
method; this should simplify reasoning about the method itself and
provide a perofmrnace lift to the calling code.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Functionality should not change, I would consequently recommend checking if the tests still pass.