Enhancing the Scripts API with a loading strategy

Overview

This post outlines a proposal to add a script loading strategy enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.’s existing Scripts APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways..  

The underlying goal of this effort is to make it easier for WordPress pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and theme developers and core to use “modern” loading approaches for JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. (like defer and async), which will help WordPress sites load faster and operate more smoothly, giving users a better experience.

Why add a loading strategy?

Data from the Web Almanac project (query) indicates that render blocking JavaScript is a significant problem on the web, with 77% of mobile pages having render-blocking scripts in the document <head> . This query shows that approximately 40% of WordPress sites stand to benefit from deferring additional scripts. Adding defer or async to script tags enables script loading without “blocking” the rest of the page load, resulting in more responsive sites overall better user experience.

Currently WordPress core as well as plugins and themes register scripts with the wp_enqueue_script and/or wp_register_script functions. Although these functions include the ability to control the placement of the script (with the in_footer parameter), they don’t include support for adding modern attributes such as defer or async to script tags. 

To add async or defer today, developers must resort to less flexible and more fragile approaches, such as directly filtering the tags at the point of output (using  the script_loader_tag filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output.), or handling the tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) output directly using wp_print_script_tag and the wp_script_attributes filter.

Using the first approach and directly filtering the tag can easily break: for example if two plugins both try to filter a tag, or if a tag has unexpected attributes already (eg. adding defer to a tag that already has async). Using the the second approach developers must carefully handle dependencies and output manually – things that that the Scripts API usually helps take care of.

How the loading strategy works

Developers specify a loading strategy when registering or enqueueing a script. For example, a defer strategy can be specified when the script isn’t required immediately during the page load cycle. WordPress will then determine which scripts can actually use a strategy based on logic for each strategy. For example, to ensure that scripts are executed in the order they are enqueued, defer can only be used on a script if every script that depends on that script can also be deferred. Inline script tags added with wp_add_inline_script would also be considered to ensure proper execution order.

The implementation would come with several initial built-in loading strategies: defer, async, and the default blocking behavior.

Out of scope for this feature

The loading strategy does not enable direct control of script tag attributes. This idea was originally proposed 10 years ago in #22249 and several approaches were considered on that ticketticket Created for both bug reports and feature development on the bug tracker. including a script attribute filter. This proposal takes a step back and aims to solve the script loading strategy aspect more comprehensively and directly while avoiding exposing the potential complications of direct attribute control.

It is worth noting that it is already possible to control attributes on wp_enqueue_script tags directly using the script_loader_tag filter. However, this is a bit of a “brute force” approach which is limited and fragile because it doesn’t consider dependencies and multiple plugins can take conflicting actions on the same tag. 

What are potential concerns with this feature?

One big concern with adding this feature to the WordPress Script API is potentially introducing a breaking change. wp_enqueue_script is a fundamental API in WordPress core, and any breaking changes could have widespread implications. Possible breakage is a possible reason that adding custom attributes as proposed in #22249 was never added to core.

This new proposal aims to ensure that there is 100% backwards compatibility, resulting in zero risk of breakage. The loading strategy will ensure that all existing uses continue to function as expected; for example, passing the boolean in_footer attribute will still control script placement. In addition, it will ensure that scripts continue to be executed in the order they are enqueued – as described above in the “How the loading strategy works” section.

Conclusion and Next Steps

Giving developers the ability to specify a loading strategy will enable them to use more advanced JavaScript loading methods while still ensuring that enqueued scripts are executed in the correct order. A “strategy” approach is also forward thinking: as the web evolves, new strategies can be developed and made available to WordPress developers. After gathering feedback, we will proceed to discussing the implementation approach and, ultimately, proposing a patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing..

Have you tried using defer or async with WordPress (or do you already)? How do you think this enhancement would change that? Please leave your feedback about this proposal in the comments below and if you can, join us at our weekly performance team chats, where we are likely to discuss this proposal in the future.

Thanks to @flixos90, @tweetythierry and @mxbclang for help writing and reviewing this post and for the many contributors who have added to the discussion around this enhancement already.

#core, #feature-projects, #javascript, #performance, #proposal

Performance Chat Summary: 6 December 2022

Meeting agenda here and the full chat log is available beginning here on Slack.

Focus area updates

Images

@adamsilverstein @mikeschroder

GitHub project

  • @adamsilverstein: New ticketticket Created for both bug reports and feature development on the bug tracker. to ensure coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. support for WebP is complete: #57328
    • When WebP was introduced to core, the implementation focused primarily on the most common use – lossy images. Part of the reason is that although WebP supports lossless compression, alpha transparency and animation as a format, actual support in WordPress depends on the underlying graphics engine (GD/Imagick) where support for these is more varied (for example GD only supports lossless WebP since version 2.3.3 and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher vs 8.1). Furthermore, detecting support for these features of the format is difficult or maybe not possible.
    • If anyone has the bandwidth to dig into this issue, guessing we can improve the current implementation to better match the expectations outlined in the ticket.
  • @spacedmonkey: Any updates on SVG?

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

Feedback requested

Measurement

N/A

GitHub project

  • No updates

Feedback requested

JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSSCSS Cascading Style Sheets.

@aristath @sergiomdgomes

GitHub project

  • No updates

Feedback requested

Database

@olliejones

GitHub project

  • @mxbclang: SQLite module has been approved though we would welcome additional review: https://github.com/WordPress/performance/pull/547
    • Planning to merge by end of week, so if you want to review, please do so by end of day Wednesday
    • @mxbclang will drop a message in #core-performance to let the team now when it is merged and ready for testing
    • Welcome as many testers as possible in advance of release of 1.8.0 on December 19

Feedback requested

Infrastructure

@flixos90

GitHub project

  • @mxbclang via @flixos90: Aiming to complete Server-Timing PR including testing this week, so pending that will request reviews by end of week. Reviews already welcome and much appreciated, particularly around how the APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. looks and behaves.

Feedback requested

Open floor

Our next chat will be held on Tuesday, December 13, 2022 at 16:00 UTC in the #core-performance channel in Slack.

#core-js, #core-media, #performance, #performance-chat, #summary, #hosting-community

#meta

Performance Chat Agenda: 6 December 2022

Here is the agenda for this week’s performance team meeting scheduled for December 6, 2022, at 16:00 UTC.


This meeting happens in the #core-performance channel. To join the meeting, you’ll need an account on the Make WordPress Slack.

#agenda, #meeting, #performance, #performance-chat

Performance Chat Summary: 29 November 2022

Meeting agenda here and the full chat log is available beginning here on Slack.

Focus area updates

Images

@adamsilverstein @mikeschroder

GitHub project

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

Feedback requested

Measurement

N/A

GitHub project

  • No updates

Feedback requested

JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSSCSS Cascading Style Sheets.

@aristath @sergiomdgomes

GitHub project

  • No updates

Feedback requested

Database

@olliejones

GitHub project

  • @mxbclang: What are the next steps on Revisit indexes for DB performance #132?
    • @olliejones: Current voting winner points to doing something dbms-version-specific to the schema, eventually in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., think we can do this in the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party if we’re willing to accept a mu-plugin drop-in module. Disadvantage here is complexity.
    • @flixos90: This is tricky – we have a voting winner, but also some strong opinions from different sides including a WP lead developer.
    • @mxbclang: Seems like the best next step here would be to close out the vote as planned but hold on next steps pending further discussion in the issue, then regroup on this in a future chat
    • All agreed; vote will close and @mxbclang will add a comment about next steps
  • @olliejones: SQLite Object Cache is coming along nicely; will create a new module proposal issue once it’s closer to complete
  • @olliejones: For future discussion: Do we need some sort of formal set of filters, etc. to support the big competent hosting providers in this back-end area?

Feedback requested

Infrastructure

@flixos90

GitHub project

  • @flixos90: Been working on iterating on the Server-Timing API PR. Still in draft because unit tests need to be added, but ready for review. Would love feedback and opinions on the APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. implementation. The most important recent change is that it is now initialized early through a drop-in, so it can capture measurements that happen before WP plugins are loaded.

Feedback requested

Open floor

  • @olliejones: There’s a sustainability team forming – see #sustainability Slack channel
  • @nickchomey: Been working on implementing a real PWA for a site under development. Plugin options are limited right now but @westonruter‘s plugin is the right approach. Is this something that the performance team can move forward?
    • @flixos90: Not sure what the current state of the plugin is; original idea was for it to be a feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins.
    • @nickchomey: Proposing a real coordinated effort be made to improve it to the point that it could be merged into core
    • @flixos90: It could definitely be feature plugin material, but as always it requires resources. If a small group is up for tackling, we would be supportive and help here possible.
    • @westonruter: The plugin is stable and essentially in maintenance mode. Not clear if there is the 80% user benefit to justify core merge just yet. See discussion between @nickchomey and @westonruter in GH issue: https://github.com/GoogleChromeLabs/pwa-wp/issues/884.
    • @flixos90: Key aspect of proposing this for core would be to come with an actual usage of PWA capabilities that immediately benefits core users
    • @westonruter: Benefit that all users could get now is offline browsing on the front-end, but there’s a separate concern of what happens when a large portion of the web is registering service workers
    • @pbearne: Aren’t we going to need something like this for real-time multi-editing in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/?
    • @olliejones: Maybe the Twenty Twenty Four theme could be made PWA-friendly?

Our next chat will be held on Tuesday, December 6, 2022 at 16:00 UTC in the #core-performance channel in Slack.

#core-js, #core-media, #performance, #performance-chat, #summary, #hosting-community

#meta

Performance Chat Agenda: 29 November 2022

Here is the agenda for this week’s performance team meeting scheduled for November 29, 2022, at 16:00 UTC.


This meeting happens in the #core-performance channel. To join the meeting, you’ll need an account on the Make WordPress Slack.

#agenda, #meeting, #performance, #performance-chat

Performance Chat Summary: 22 November 2022

The full chat log is available beginning here on Slack.

Announcements

  • @clarkeemily thanked the team for the 1.7.0 release yesterday

Focus area updates

Images

@adamsilverstein @mikeschroder

GitHub project

  • No updates

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

Feedback requested

Measurement

N/A

GitHub project

  • No updates

Feedback requested

JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSSCSS Cascading Style Sheets.

@aristath @sergiomdgomes

GitHub project

  • No updates

Feedback requested

Database

@olliejones

GitHub project

  • @aristath continues to refine the SQLite module, and it’s pending a review so we can merge it
  • @aristath started working on a draft post to publish on make when the SQLite module gets merged, to invite testers.
  • @aristath having difficulty running performance A/B tests for the WP-CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. classes autoloader POC. This one is going to take some more time.
  • @OllieJones has been working on an sqlite-object-cache pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party (see repo). He mentioned it in last week’s meeting, but the question is whether we want to include this as a module in the performance-lab plugin. Right now it’s standalone and works perfectly fine. My personal opinion is it should be considered as a module… SQLite is universal and can therefore be used in Core to improve performance as a caching mechanism.

Feedback requested

Infrastructure

@flixos90

GitHub project

  • No updates

Feedback requested

Open floor

  • @oandregal asked: for folks working around wp_get_theme etc. Wanted to share a cross-PRs comment. I’m having troubles following direction regarding whether or not to use wp_get_themeThis PR proposes removing it from some places (backports changes from core), while these other two proposes to add it to a few hotpaths. Would you mind clarifying direction and nuances in this thread? Thank you.
    • @spacedmonkey has replied on the PR
    • @flixos90 also advised his response would be the same, we want to avoid calling wp_get_theme() multiple times where it can be called once instead. It’s not that we shouldn’t use the function anymore, just be conscious of limiting its usage to when it’s necessary
      • @10upsimon Perhaps a discussion for elsewhere @flixos90 but has there been consideration for a singleton instance response? i.e wp_get_theme() returns a singleton instance ( ::get_instance()) as opposed to instantiating a new class with each function return statement? Is there ever a valid cause for re-instantiating the WP_Theme class? I’m sure it’s far more complex and involved than I make it out to be, and I’d assume that this has been considered.
      • @spacedmonkey and @flixos90 advised we shouldn’t use singleton. But even if we use a global, there is a potential risk: Object instances are mutable so if any change was made on one instance returned from the function, it would affect every other instance if we went with a scenario where no new entity was returned on every call. For the most part this could be a backward compatibility break. So I’m not really sure this would be a worthwhile effort
  • @clarkeemily Just to call out there are currently 15 open issues marked as ‘Needs Review‘ across all focus areas and please keep an eye out for any PRs that may need review alongside these
    • @cpal I’ve recently been looking for ways we can leverage our in-house performance/load/functional testing solution at Pressidium® to help out the core-performance team in whatever way we can but I haven’t found something totally relevant just yet. I’m happy to share details on what we currently have available in the testing realm and what is yet to come.
      After having a brief into chat with @aristath, I believe we may be able to get something going with some of the work he is currently tackling after some further discussion.
      What do you all think?? Help a noob out that’s eagerly looking to find his footing in the WP Community by throwing out some relevant suggestions if-ever/whenever you can!
      • @adamsilverstein asked if a brief overview could be provided on testing in the context of WordPress Performance
      • Pressidium is a managed/HA hosting provider and I’m tasked with performance testing that we currently use to test out client sites and services depending on the needs on the client but since we went through (and are continuing with) developing a testing infrastructure we want to give back to the WP community with it all.
      • Further discussion / introduction ongoing here in the SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. chat

Our next chat will be held on Tuesday, November 29, 2022 at 16:00 UTC in the #core-performance channel in Slack.

#core-js, #core-media, #performance, #performance-chat, #summary

Performance Chat Agenda: 22 November 2022

Here is the agenda for this week’s performance team meeting scheduled for November 22, 2022, at 16:00 UTC.


This meeting happens in the #core-performance channel. To join the meeting, you’ll need an account on the Make WordPress Slack.

#agenda, #meeting, #performance, #performance-chat

Performance Chat Summary: 15 November 2022

The full chat log is available beginning here on Slack.

Announcements

  • Excellent update on the 6.1.1 release, which is going out today12 out of the 30 tickets in the 6.1.1 release are focused on performance! That is a great outcome and a testament to the team’s hard work on addressing some of the follow up quirks around 6.1 performance

Focus area updates

Images

@adamsilverstein @mikeschroder

GitHub project

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

  • @spacedmonkey: No updates on object caching, has been focusing on 6.1.1 and theme.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.
    • A lot of theme.json parsing APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. have very serious performance issues
    • We have fixed a couple of them and they are making the way in 6.1.1
    • Another very relevant ticketticket Created for both bug reports and feature development on the bug tracker. is #57077 and #57114
  • @OllieJones: has a prototype of SQLite3 persistent object cache cooking; will make a module proposal soon (basically use SQLite for object caching rather than the main DB)
    • @flixos90: I wonder how much that overlaps or potentially conflicts with the proposal to use SQLite as database
    • @aristath: No overlap or conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved.… But they can definitely be combined for a performance boost
    • @flixos90: If a site can benefit from an SQLite DB speed and we implement that feature reliably, why would you not want to use that but then use it for an object cache?
    • @OllieJones: there are many installations that could benefit from a persistent object cache pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, without requiring a port of the main data to SQLite. And backup / redundancy / infrastructure would not need to change
    • @flixos90: The idea sounds very useful to me especially given wider support of SQLite, but I would still like to explore a better answer on balancing this “SQLite as cache” project with the “SQLite as DB” project and the tradeoffs between the two

Feedback requested

Measurement

N/A

GitHub project

  • No updates

Feedback requested

JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSSCSS Cascading Style Sheets.

@aristath @sergiomdgomes

GitHub project

Feedback requested

Database

@olliejones

GitHub project

  • @aristath: SQLite PR is ready for another round of tests and reviews
    • @flixos90: reviewed it a few times and it looks excellent to me. Some quirks to still address mostly. One thing I still want to explore a bit more is trying to figure out a way to have the SQLite DB prepopulated so that you don’t end up on the WP Install screen after updating the module; this wouldn’t be a blockerblocker A bug which is so severe that it blocks a release., but it would make the user experience a whole lot smoother
    • @flixos90: I would suggest we polish this over the next week and aim for a merge within the next 2 weeks? This way we can publish the first version in the upcoming Performance Lab 1.8.0 release mid December
  • @aristath will work on drafting a Make CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. post on the SQLite module for once it’s in the Performance Lab plugin
    • @flixos90: Best to draft it soon, so that we can review and finalize it early; this way we can publish it immediately the same day that that release will go out (December 19)

Feedback requested

Infrastructure

@flixos90

GitHub project

  • @flixos90: Next Monday we’ll have the Performance Lab 1.7.0 release
    • At the moment, there are still 5 PRs in the milestone which need to be committed or punted by tomorrow
    • @mukesh27: PR #582 is ready for your review
      • @flixos90: Looks like that PR tackles a bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. that #578 also focuses on (although that one does a bit more)
    • @flixos90: Given the size of the database health checks PR, I think it’s a bit too early (or too late, if you look at it from another angle) to merge it this short before the release, also since it’s a new module
      • @OllieJones: ok. let’s puntpunt Contributors sometimes use the verb "punt" when talking about a ticket. This means it is being pushed out to a future release. This typically occurs for lower priority tickets near the end of the release cycle that don't "make the cut." In this is colloquial usage of the word, it means to delay or equivocate. (It also describes a play in American football where a team essentially passes up on an opportunity, hoping to put themselves in a better position later to try again.) it; will iterate on it so maybe we can merge it in the next few weeks for 1.8.0
    • @mehulkaklotar: PR #571 is under reviews right now, we will be able to merge it before tomorrow
    • @pbearne: I believe they are ready but will check

Feedback requested

Open floor

  • @OllieJones: I’d like to see w.org sign up for the https://greensoftware.foundation/
    • @flixos90: What kind of effort or commitment does that entail? As mentioned on the issue that you opened about this, this would probably be best to move forward with a Make Core post proposing it; getting a sense of interest at a larger scale is one reason I’d propose writing a Make Core post

Our next chat will be held on Tuesday, November 22, 2022 at 16:00 UTC in the #core-performance channel in Slack.

#core-js, #core-media, #performance, #performance-chat, #summary

Performance Chat Summary: 8 November 2022

Meeting agenda here and the full chat log is available beginning here on Slack.

Mini bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub of performance issues for 6.1.1

  • See here
  • https://core.trac.wordpress.org/ticket/56923 – PR committed; should become available when @mamaduka syncs GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. on Thursday
  • https://core.trac.wordpress.org/ticket/56815 – assigned to @flixos90 for review
  • https://core.trac.wordpress.org/ticket/56900 – assigned to @peterwilsoncc for commit
  • https://core.trac.wordpress.org/ticket/56945 – @flixos90 has PR in progress at https://github.com/WordPress/wordpress-develop/pull/3536 that needs review and feedback, especially from Gutenberg team. @annezazu working to loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. someone in there.
  • https://core.trac.wordpress.org/ticket/56948 – ready for commit, just needs a final review; assigned to @peterwilsoncc
  • https://core.trac.wordpress.org/ticket/56952 – @adamsilverstein to look into
  • https://core.trac.wordpress.org/ticket/56974 – @flixos90 took a first look at the PR last week and will give it a comprehensive review today
  • https://core.trac.wordpress.org/ticket/56990 – @adamsilverstein‘s changes need review/testing
  • https://core.trac.wordpress.org/ticket/56991 – @spacedmonkey‘s fix at https://github.com/WordPress/wordpress-develop/pull/3575 needs review
  • https://core.trac.wordpress.org/ticket/57012 – ready for commit by @peterwilsoncc

Focus area updates

Images

@adamsilverstein @mikeschroder

GitHub project

  • @adamsilverstein: Discovered a library, jSquash, that brings image format encoding/decoding to the web. Tested a bit and oping to use it to enhance the core image blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. with modern image capabilities. If successful, would let us introduce AVIF support without depending on server-side support.
  • @mehulkaklotar: Working on #563 for Performance Lab to change default WebP quality to 82; PR needs review.

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

  • @spacedmonkey: Working mostly on 6.1.1 issues, but a few for 6.2, as well:
    • https://github.com/WordPress/wordpress-develop/pull/3544
    • https://github.com/WordPress/wordpress-develop/pull/3528
    • https://github.com/WordPress/wordpress-develop/pull/3534
    • https://github.com/WordPress/wordpress-develop/pull/3366
    • https://github.com/WordPress/wordpress-develop/pull/3365
    • https://github.com/WordPress/wordpress-develop/pull/3178
  • @tillkruess: Chatted with @johnjamesjacoby about adding a health check for the new wp_cache_supports() function to show which object caching features are supported/not supported but recommended. See https://github.com/WordPress/wordpress-develop/pull/3347. For example, get_multiple() is quite important. Any feedback on adding as a health check?
    • @spacedmonkey: Now have wp_cache_supports in core that we could use and wp_cache_supports( 'get_multiple') in all options. Instead of loading all options in one cache key, load each in their own cache key and all in single call.

Feedback requested

Measurement

N/A

GitHub project

  • No updates

Feedback requested

JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSSCSS Cascading Style Sheets.

@aristath @sergiomdgomes

GitHub project

  • No updates

Feedback requested

Database

@olliejones

GitHub project

Feedback requested

Infrastructure

@flixos90

GitHub project

  • @flixos90: Plugin codebase is now updated to reflect our recent modifications to the focus areas per https://github.com/WordPress/performance/pull/566, thanks to @mukesh27

Feedback requested

Our next chat will be held on Tuesday, November 15, 2022 at 16:00 UTC in the #core-performance channel in Slack.

#core-js, #core-media, #performance, #performance-chat, #summary, #hosting-community

#meta

Performance Chat Agenda: 8 November 2022

Here is the agenda for this week’s performance team meeting scheduled for November 8, 2022, at 16:00 UTC.


This meeting happens in the #core-performance channel. To join the meeting, you’ll need an account on the Make WordPress Slack.

#agenda, #meeting, #performance, #performance-chat