Performance Chat Summary: 30 May 2023

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

Announcements

  • Blogblog (versus network, site) post was published outlining the WordPress 6.2 server performance analysis summary to identify the biggest opportunities to target for future performance enhancements
  • All the lazy-loading PRs were committed last week
  • Notable inclusion in 6.3 #58394 resulting in ~7% faster 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. themes and 2% faster classic themes (full results)
    • FWIW, this was one of the issues identified in the server performance analysis, so it’s really nice to see it already being addressed.
  • @swissspidy committed two minor changes to i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. that slightly improve performance in some cases:

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @joemcgill Other than the analysis already posted, I don’t have any further update, other than wanting to identify some epics out of that work that we can start to take action on.

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

  • No updates this week

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon Enhancing the Script 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. with a loading strategy update:
    • Most of the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. PR feedback items that are unrelated to the topic of defer/async dependencies and inline scripts have been addressed.
    • Actioning of remaining points of feedback are largely pending the outcome of a final strategic decision around handling deferred and async dependencies, and inline scripts attached to defer/async scripts.
    • Discussions around how best to solve the above are ongoing, with POC’s currently being developed.
  • @joemcgill For the initial design for this feature, we intended to support all current use cases that the Script Loader supported, including support for inline scripts when added to a script handle. @westonruter and @10upsimon have been making good progress on improving that implementation, and it would be useful to have the proposed iteration completed, even if we decide to remove those enhancements for the initial commit.
    • However, I think we’re close to needing to make a decision about what belongs in the initial commit and what can be left for further iteration. Hopefully we can finalize those decisions this week.

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • No updates this week

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger For the Plugin Checker, we are working on the final iterations on the last issue for Milestone 1. Once complete, we will start work on the second phase which will be implementing the initial checks that will be included as part of the plugins first release. You can follow the progress on the GitHub repo here. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @joemcgill Until we have all of the modules published as standalone plugins, we’re blocked on the eventual removal of those modules being bundled with 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, which is still the plan.
    • @mukesh27 We already release two plugins can we start removing those from PL?
    • @joemcgill We can start working on the process, but I think we’ll wait on a PL release that removes all of them until we’ve got the UIUI User interface and migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. path really figured out.
    • @mukesh27 Is there any way to get approval for Dominant Colour Images as it blocks Milestone 2 work?
    • @joemcgill Nope. Just wait our turn in line, just like all the other plugins
    • @flixos90 I think the main priority beyond waiting for the approval is to scope out what we want the user experience for Milestone 2 to be like. We then have to implement that and ship it to allow users to migrate before we actually remove the modules
    • @joemcgill Agreed. And, admittedly, a lot of us have been focused on landing some priority features from our roadmap early this release cycle

Open Floor

  • A question was posted against the agenda this week asking if we can take a look at https://core.trac.wordpress.org/ticket/49278
    • @joemcgill From a quick read of that ticketticket Created for both bug reports and feature development on the bug tracker., it sounds like @peterwilsoncc and @costdev previously determined that the current 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. still needs some work before it’s ready to land in core.
    • Not sure if @markparnell is interested in picking this back up, or someone else, but it would need to be ready for another review pretty soon if we wanted to land it in 6.3.
    • @mukesh27
      • Query before (38 seconds)
      • Query after (0.0028 seconds)
      • The improvement is significant as per the ticket description
    • @joemcgill MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. queries are a complex part of the API and needs to be handled with care. There are times with meta queries that optimizations are proposed where really the design of a WP_Query needs to be reconsidered (not sure about this case).
    • There are many other proposals in  TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets that are focused at improving performance of meta queries as well, like adding an extra index to core, etc.
    • @spacedmonkey Any change would need a lot of unit tests. Unit tests for all query classes. So post, term, comment, site and user.

Our next chat will be held on Tuesday, June 6, 2023 at 15:00 UTC in the #core-performance channel in Slack.

#core-performance, #performance, #performance-chat, #summary

Performance Chat Summary: 23 May 2023

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

Announcements

  • The Performance Lab plugin reached 70k active installations this week
  • Decision on whether to hold the meeting June 6 ahead of travel around WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Europe
    • Agreed to keep the June 6 meeting

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon Enhancing the Script 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. with a loading strategy:
    • Merged @westonruters PR which massively improves how we handle inline script loading
    • Hoping to merge @westonruters PR for removal of $args normalization and flattening of that data, hopefully today
    • Looking for review on adding @covers  in this PR@spacedmonkey if you have a min that would be great
    • Ongoing smaller iterations to the PR as we work through some comms around async handling
    • No further updates at this stage
  • @joemcgill That mostly covers it, I think. I’m seeing lots of progress on this effort over the last few weeks. We’ve got lots of great feedback and continue to discuss specifics about the proposal on the Trac ticketticket Created for both bug reports and feature development on the bug tracker.https://core.trac.wordpress.org/ticket/12009
    • As @10upsimon said, one of the last remaining issue that we’re trying resolve is making sure we’re all on the same page about how to best handle inline scripts, as there has been some disagreement about the best path forward there. Conversation about that topic is happening in this issue: https://github.com/10up/wordpress-develop/issues/63

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @joemcgill Nothing from me either, though I know I’ve seen some updates to improving lazy loading landing over last week.
  • @flixos90 I committed the 4th out of 5 lazy-loading fixes for 6.3 yesterday, and the last PR https://github.com/WordPress/wordpress-develop/pull/4439 looks like it’s close as well. @Jonny Harris You previously requested changes, could you give it another look please?
    • Also anybody else’s feedback would be much appreciated!

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger For the Plugin Checker, we are working on the final issue that came out of the Review/QA. Once done, we’ll be doing some testing to make sure everything is working as expected and start working towards an initial release. You can follow the progress on the GitHub repo here. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • No updates this week

Open Floor

  • @spacedmonkey Going to re-share from last week – This discussion has been very active – https://github.com/WordPress/performance/issues/403
    • Worth looking into as team ^
    • @joemcgill Is this something that could be handled in a performance lab module (or other 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), or does this need to be a direct to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. proposal?
    • @spacedmonkey I think this one would directly in core. If you want to do this, you can already do it in a plugin…
    • @joemcgill Got it. So, it seems we either need to decide if it’s worth us pursuing a “canonical” version of this plugin that is supported by this team. If not, I think it would be better for this conversation to move from the performance repo and directly to the related Trac ticket. (Also, this is just like, my opinion)
    • @spacedmonkey Personally I am not sure if we should do this in core.
    • This plugin will do the functionality they ask for https://github.com/stuttter/ludicrousdb It is a “canonical” plugin for a lot of advanced database functionality.
    • @johnbillion I can’t see any performance figures anywhere in that ticket, are there any? Lots of theoretical discussion but no numbers
    • @spacedmonkey good point
    • @joemcgill I don’t want to discourage the folks who want to work on this, but if it’s not something this team wants to commit to supporting, then we should politely close the proposal and redirect them to other channels, like Trac or a standalone plugin.
    • @spacedmonkey We need number to validate and an updated 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.. Without that, it will have to go to the backlog
  • @westonruter I know there is a problem of orphaned autoloaded options, where plugins add options but don’t clean up after themselves upon uninstall. I know we also have an Autoloaded options Site Health test.
    • Maybe this has already been discussed, but what if the test were extended to check for autoloaded options that aren’t being used anymore?
    • Granted, this wouldn’t need to be a Site Health test and could instead be a cron job.
    • Consider a job that runs once a week which hits the homepage and the most recently-published post, and when running pass a query arg to capture all calls to get_option()
    • @spacedmonkey I am currently writing a document, where I suggest this.
    • @spacedmonkey Have you read this – https://github.com/WordPress/performance/issues/526
    • TDLR, this hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. into get_option and tracks what is used on a page load. It when stores an array of used options and then can be used to reset options that are autoloaded but not used.
    • There is a possible of setting autoload no to options that are needed for other parts of WordPress, like sitemaps, rss feeds, rest apis, or the cms
    • There is a chance we could tank performance on some page types and improve it on others.
    • @westonruter Yeah, would need to hit the important endpoints and capture the used options for each
  • @joemcgill I wanted to note that the submission deadline for WCUS is later this week, and it would be great to have good representation from this team. Curious if anyone else is planning to submit anything and if so, I’d be happy to support folks with feedback or idea development this week.

Our next chat will be held on Tuesday, May 30, 2023 at 15:00 UTC in the #core-performance channel in Slack.

#core-performance, #performance, #performance-chat, #summary

Performance Chat Summary: 16 May 2023

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

Announcements

  • Yesterday saw version 2.3.0 of the Performance Lab 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 released

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @aristath Autoloading PHP classes in WP: I’ve been doing some tests and it looks like this PR improves server response times a bit. More importantly though, it reduces memory usage so that’s a big win. The only “controversial” thing about that PR is that it allows users to override CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. classes if they load their own classes with the same name early enough.
    • Pros: No more user hacks in Core files! If users want to override a class in Core, it will be possible. There are many valid reasons and scenarios to do that, since not everything in Core is filterable. What that means is that users will no longer resort to editing Core files directly to do what they need to do – and therefore they will be able to update their sites normally. Responsibility to maintain their own personal overrides falls to them. Maintain your own hacks.
    • Cons: It’s going to be a tough sell.
    • @joemcgill Amazing work to see. Would be useful to know what support or feedback @aristath wants from us to keep this moving forward.
  • @spacedmonkey just created this ticketticket Created for both bug reports and feature development on the bug tracker. #58327
  • @spacedmonkey PRs in need of review
  • @joemcgill For our goal, Identifying and addressing the largest server response time bottlenecks in WordPress core – I’ve drafted a blogblog (versus network, site) post summarizing the performance analysis I did of WP 6.2 and plan to post it this week after getting a few eyes on it. @spacedmonkey who has been an early reviewer and contributor to this work has already been busy spinning up tickets for some of what was discovered.
    • @spacedmonkey The PRs listed above are the “flow hanging fruit” from the review

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @joemcgill We’re continuing to track and respond to feedback on the Trac ticket for adding support for script loading strategies to core. I’ve been focused on trying to get consensus with @azaozz about the open question about how to best support async, and in the meantime, @10upsimon has been reviewing and responding to other feedback, @10upsimon anything to add?
  • @10upsimon I am addressing lower hanging fruit regarding test cases, adding @covers  to tests, and adding failure messages. Regarding @covers it is generally unclear which methods and functions I should be adding, as even though we may test something as simple as an inline script in the after position attached to a deferred script, there are many functions in the logic chain that are affected, such as WP_Scripts::do_item, WP_Scripts::get_eligible_loading_strategy etc. Do we add all, some, mose affected etc? @spacedmonkey this is probably more a discussion with you.
    • @joemcgill Right. I know the WP Core Handbook now has a recommendation to include @covers, but I’m not aware of any specific best practices that have been documented, so some discussion here would be helpful.
    • @westonruter AFAIK the gist of it is if a given test touches a given function/method, you can add @covers to explicitly state those are being tested. (Not clear to me why this can’t be automatically detected though)
    • @spacedmonkey Covers is to note what the test covers. What method or function are you testing in this test.
    • @10upsimon So it should include no methods or functions not explicitly visible in the test function?
    • @joemcgill Official PHPUnit docs is here: https://docs.phpunit.de/en/8.5/annotations.html#appendixes-annotations-covers-tables-annotations
    • Note that the docs explicitly state: This will make sure that code is only marked as covered if there are dedicated tests for it, but not if it used indirectly by the tests for a different class, thus avoiding false positives for code coverage
    • @spacedmonkey Every new method or function should have a test covering it. That is the point of unit tests, to see what is / isnt covered.
    • @10upsimon Sure, and they do, but we have some tests that are so reliant on – for example – other methods in the chain that are critical to the outcome of the test, but not called directly in the test. A good example is WP_Scripts::do_item and  WP_Scripts::get_eligible_loading_strategy, but given that these have dedicated tests, it appears as though adding them via @covers is not needed at all, only against tests solely created for their coverage.
    • @spacedmonkey You can have multiple covers comments if you want. It is common to do this in core, as lots of wrapper functions call an class. It makes sense to mark the class / method and function as covers.
    • @10upsimon ^^ This is where the lines get blurred to me, this is what I have done in a recent PR that I will link to from your PR feedback, I’m just not sure where the buck should stop. Let’s pick this up in the PR itself.
  • @10upsimon I’m addressing @westonruter CSP feedback as next priority, which will also result in changes to the test suite

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • No updates this week

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @mukesh27 I am currently working on some of the issues for Plugin Checker, and there are some PRs ready for review at https://github.com/10up/plugin-check/pulls/mukeshpanchal27, If anyone has capacity please review it. Thanks!
  • @joegrainer We are working on some of the final issues for the Plugin Checker that came out of the Review/QA. This brings in some 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. fixes and other enhancements as we work towards an initial release. You can follow the progress on the GitHub repo here. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • No updates this week

Open Floor

Our next chat will be held on Tuesday, May 23, 2023 at 15:00 UTC in the #core-performance channel in Slack.

#core-performance, #performance, #performance-chat, #summary

Performance Chat Summary: 9 May 2023

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

Announcements

  • n/a

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

  • @spacedmonkey updates above
  • @olliejones I’ve been working on object cache instrumentation, no big results to report
  • @spacedmonkey There a project afoot to add a spec for getting object cache information https://github.com/rhubarbgroup/wp-object-cache-info-spec
    • @olliejones A new revision of this is coming soon, from me
    • @spacedmonkey Basically add a wp_cache_info function to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and allow WP CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress., query monitor and other tools to understand the cache implementation

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • One agenda item here today Discussion this week on CSP/async concerns in https://github.com/WordPress/wordpress-develop/pull/4391
  • @westonruter I left some more feedback related to compatibility with Content-Security-Policy and the deferred inline scripts: the current implementation has a vulnerability related to CSP nonces, and it also blocks Strict CSP by requiring ’unsafe-hashes’ due to the onload attribute. I provided recommendations for how to address these issues and have been discussing with @joemcgill
  • @joemcgill One of my questions about the CSP concerns you raised, @westonruter is whether this whole class of problem would be eliminated if we were to change the way we are approaching async dependencies, or if the problem exists with defer as well? For example, if we weren’t concerned about maintaining loading order (because with async it shouldn’t matter if the scripts are well constructed) then we wouldn’t need to control loading inline scripts so they run after their dependencies.
  • @westonruter Yes, the problem with CSP nonces exists for deferred inline scripts for defer scripts as well
  • @joemcgill Ok, so I’ll need to double check whether it still makes sense for us to control the loading order there, and if so, then work on implementing one of your suggestions. Your explanation and research here has been really valuable, so thank you!
  • @westonruter If we eliminate special support for deferred inline after scripts for async scripts, then we can get rid of the onload attribute and just use addEventListener('load') in an after script.
  • @flixos90 Being unfamiliar with “it also blocks Strict CSP by requiring ’unsafe-hashes’ due to the onload attribute” can you elaborate or share a link with how the onload attribute causes a problem there?”
  • @westonruter sure, CSP’s security model relies on nonces and hashes. For nonces, all script elements on a page should have a nonce attribute which matches a nonce value passed in the Content-Security-Policy response headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.. However, such nonces are not possible to be attached to event handler attributes, like onload
  • @flixos90 Your suggestion with addEventListener('load') is problematic if it is wrapped around the inline script because it changes the scope of the code within. This was ruled out as an option early on in the design of this 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. because of that
  • @westonruter Actually not quite because the callback passed to addEventListener('load') still just calls wpLoadAfterScripts(handle) In the same way that onload="wpLoadAfterScripts(handle)" is now
  • @flixos90 Ah, so you mean WP core would handle that event listener on its own?
  • @westonruter It’s just that this change is not compatible with async scripts, but it does work for defer scripts
  • @flixos90 That is the part I don’t understand, why wouldn’t that work for async whereas onload would?
  • @westonruter Because async scripts can load immediately before the rest of the document loads. Example: https://async-script-load-event-listener-test.glitch.me/?delay=500
  • @flixos90 I think the approach of the event listener is definitely preferable, as defer is more important to holistically support at this point, as it works in a simpler way with the current way core handles dependencies
    • That would mean we keep defer functioning like it does now, but will have to (continue to) rethink async support, which I think is okay. I’d also like to throw out there a consideration of potentially only launching with defer in the first version of this
    • That would give us time to decouple the async exploration
  • @joemcgill Apart from getting into the weeds about how to best address the CSP issue, I do think it’s worth a broader discussion about whether our current approach to async scripts is too conservative (mostly to try and help developers avoid loading errors with dependencies).
  • @joemcgill I think the concerns we based the current implementation from are valid, but maybe a bit heavy handed, so I’m open to us being less concerned with load order concerns if everyone is agreed.
  • @westonruter
  • My impression is that async scripts are currently quite rare compared to defer scripts. It’s even rarer that async scripts would depend on each other. But in the cases where they do have dependencies (e.g. AMP) then the loading order is handled in the scripts themselves, and not by source order in the page. Other cases of async scripts having dependencies, e.g. Google Analytics, it’s also handled by the library and loading order doesn’t matter
  • @flixos90 My concern with loosening that is around developer education. We would need to be very clear on what applying async to a script implies. Core would handle defer to always work (make it blocking if needed), but for async it would indeed be on 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 / theme developer if we loosen the current limits
  • @joemcgill I think that it would be a reasonable position to take, that if you are registering a script that is async or depends on an async script, then it is your responsibility to manage the load order concerns. But agree that dev ed would be important
  • @spacedmonkey FYI, 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/ will likely needed deferred scripts for Interactivity API runtime ( I guess is part of co-op editting ). See https://github.com/WordPress/gutenberg/pull/49994
  • @westonruter Fortunately, there are ample educational materials out there for how async behaves. And devs should only use it if they know what they are doing.
  • @joemcgill Yep! But as this would be somewhat new for WP script enqueueing, we should support that with some WP-focused documentation as well.
  • @joemcgill Unless someone feel strongly that we should NOT make this the responsibility of the developer, @10upsimon and I can work on updating the current approach to allow for a less strict implementation.
  • @flixos90 I think this still deserves more discussion, also with the other now additional consideration that inline scripts would also be responsibility of the developer
  • @westonruter What’s certain is that while we would promote defer, we would need to be very clear in the docs that async order is not predictable. So while defer can often be applied to all scripts, this is definitely not the case for async.
  • @joemcgill Happy to make it a future agenda item here. We’ll also be looking for feedback when we post on make core about the feature and can address it there as well.
  • @flixos90 But more importantly, what about decoupling this discussion? I suggested that above: I think we’re all pretty clear what should happen with defer, but we need to discuss async more
  • @flixos90 Why not remove all async support from the current PR and keep that for an iteration? This allows us to iterate on what is already clear, and gives us time to approach the other problem separately
  • @joemcgill I think we should save that option for if we can’t come to resolution in the next few weeks.
  • @flixos90 That’s fair, though I want to make sure we don’t come to early conclusions and eagerly update the PR with something that is then still being discussed
  • @flixos90 It’s clear that we’re basically “going back to the drawing board” with async. So one could argue that topic is not yet ready for engineering. Having that discussion and providing related comments on the PR makes it more difficult for the folks working on the code to focus on the improvements to the PR that are clear
    • @joemcgill I disagree that we’re going back to the drawing board, but am happy to pick this up async so we can move on with this conversation
    • @flixos90 We are changing the design of how async support works from how it was designed, that’s what I mean by that. Which of course is not a bad thing, but we’re not ready to write code for that because of it still being discussed
    • @joemcgill Yeah, but it seems like a rather small change that will result in reducing the logic we’ve implemented, not adding a lot more, so I’m not all that concerned as long as we get consensus on the correct approach.
  • @clarkeemily I’d like to suggest picking this up async, perhaps on the GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ issue? We can also add an agenda item to revisit this time next week too if no conclusion is drawn on the GH issue? We have a few more project updates to go through, so we can circle back async

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @flixos90 Just a quick reminder that the Fetchpriority standalone plugin was published on Friday, the Fetchpriority standalone plugin was approved for wordpress.org. Since we already have the infrastructure for it set up in WordPress/performance, and since we’ve already established that it works with the WebP Uploads standalone plugin, I’m going to go ahead and publish a first version now. Will share progress here

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @joemcgill I plan to open a few tickets for some enhancements we’d like to make to the automated performance tooling we added to core during the 6.2 milestone, but no immediate work happening there.

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainer I have been away the past week so not much to update here from me but I will be working through the issues raised in the Plugin Checker Milestone 1 Review/QA. We have made some progress and closed a few of these out already. You can follow all progress on the GitHub repo here. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

Open Floor

  • @thelovekesh Since the performance plugin is expanding in terms of the number of classes, functions, and hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. it contains, I believe it would be great to start documenting things so that plugin and theme developers may use them. We can start using the phpdocPHPDoc (docblock, inline docs)-parser to automatically create the necessary documentation from code comments when a release is made and the same can be deployedDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. to the GitHub pages site(https://wordpress.github.io/performance/) or to WordPress.org.

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

#core-performance, #performance, #performance-chat, #summary

Performance Chat Summary: 2 May 2023

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

Announcements

  • Proposal for using fetchpriority to enhance LCP image performance published

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @spacedmonkey: Committed [55701] and [55702]
  • @spacedmonkey has been working on #58196
    • Could have the possibility to have 6-10% of server time for 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. themes
    • @flixos90: There are some conflicting metrics on that last one. We have to figure out why your metrics show such good values while mine don’t show any notable change. I tested with 6.2 (not trunk) and didn’t see any performance impact
    • @spacedmonkey: I think it related to changes in trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision.
    • @johnbillion: The ticketticket Created for both bug reports and feature development on the bug tracker. is now about adding caching (see new comment and new PR)
    • @spacedmonkey and @flixos90 to follow up with additional benchmarks to determine why the benchmark results differ so much

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

  • @spacedmonkey plans to commit lazy loading of comment metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. everywhere, today or tomorrow
    • All other types, like user and post meta are so heavily used ( user meta == capabilities and post meta, post thumbnails ), that it not really worth lazy loading it
  • @xavivars had a couple of comments regarding the SQLite integration
    • @xavivars: I know it has been discussed previously that this may not be a “performance” project, but only something related to the work here, so not sure if this is the relevant forum for that, or there’s a better place for it
    • @flixos90: Yes, just to recap the above conversation from last week: The SQLite 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 / PL module will going forward no longer be directly associated with the performance team. We’ll still be supporting the project, but it will be decoupled from the WordPress/performance repository and the Performance Lab plugin
    • @flixos90: Probably best to raise in the plugin’s GitHub repository
    • @xavivars: It may be worth to remove it from https://make.wordpress.org/performance/roadmap-2023/#category-database-optimization (or make that decision explicit in the roadmap)
    • @flixos90: Good point. Let’s raise that again next week when more people are around to discuss. Maybe we could change it to support the project rather than driving it, or something like that.

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @flixos90 would like to share that there is now a pull request for the new script loading strategy https://github.com/WordPress/wordpress-develop/pull/4391
    • @westonruter: In that pull request for Script Loading Strategies, identified what may be missing support for async scripts having dependencies. I put together an Async Library Script Loading Demo that demonstrates how async scripts could indeed have dependencies. So I’d like it if anyone could affirm my findings for the need for async scripts to be able to have dependencies/dependents. Feel free to just comment on the PR. Since 10up is not here, it doesn’t make much sense to chat about it right now.
    • @flixos90: I’ll have to take a closer look. Let’s continue discussing, but I’d like to note that this could also happen in a separate follow up enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature.. It depends a bit on how complex it is and how much it increases the scope of the current effort I’d say. We can always iterate, and not supporting async with dependencies could only be the first iteration
    • @westonruter: From what I can see, it’s more about just copying the same logic in place for defer. Currently there’s a check that just bails async entirely if there are deps
    • @flixos90: When the current implementation was originally defined, it was noted that by default async scripts don’t execute necessarily in the same order their tags are printed on the page.
    • @westonruter: When async scripts have dependencies, the order is explicitly not significant. It’s up to the library to ensure that the logic is executed in the right order. You can see in my demo when you get a chance. So it’s less about the execution order as much as being able to automatically get a bundle of scripts printed
    • @flixos90: Yeah, but I feel that is what complicates things. We would have to assume the script that uses async does the right thing, whereas so far with how the strategies are handled, WordPress will ensure it loads things in the right order
    • @westonruter: Since it is opt-in by developers, I don’t see it being an issue.
    • @flixos90: I agree that this is something worth supporting in WordPress, but supporting it has different implications for developers than what is supported by the current PR. So I would see that as a separate enhancement as it requires its own level of discussions. On a technical level we could easily support it it seems, but the implications are different
    • To be discussed further
    • @westonruter: Another point I wanted to raise: for that same pull request, I also proposed the elimination of manual script tag construction in WP_Scripts to improve readability, increase robustness, and facilitate CSP in scripts printed by WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Any concerns about using those script 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.) construction helpers in WP_Scripts? It’s not clear why they weren’t utilized when they were introduced.
    • @johnbillion: +1 to that, those functions haven’t gotten much use since they were introduced
    • @flixos90: Yeah I agree we should definitely use them
    • @flixos90: It would be great to get additional code review feedback this week, just please be conscious that Simon who has been leading the work on the PR is out this week, so it may only be next week that he’ll get back to it

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @flixos90: Last week I opened and milestoned several TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets to enhance core’s lazy-loading logic:
    • #58211
    • #58212
    • #58089
    • #56588
    • #58213
    • These enhancements will benefit an eventual fetchpriority implementation as well. The idea is that the latter should therefore only happen after those enhancements have landed.

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • No updates

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @flixos90: There is still some work going on in the plugin check repository project https://github.com/orgs/10up/projects/12/views/1. It’s close to having a first alpha version that is ready to use, at which point it would be great to move it to the WordPress GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ organization

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @flixos90: We’re still awaiting approval for the Fetchpriority standalone plugin repository, as the plugin review team is currently seeing notable delays. Fingers crossed we get an approval soon
  • @flixos90: Other than that, we’ve started thinking about what the implementation for a Milestone 2 (actually removing the modules from PL) could look like, see the overview issue description for sub-issues

Open Floor

  • @westonruter: On the topic of CSS, there’s Felix’s Gutenberg issue to load less CSS for core blocks by only printing the CSS for the blocks used on the page, here specifically for classic themes. I identified some challenges with inlining CSS with rendered blocks. I suggested a (probably controversial) alternative using output buffering. Here’s a proof of concept plugin. Maybe page output buffering now would be less controversial since it’s essentially how block themes are working?
    • @spacedmonkey: I am not a fan of output style tags inline. I feel like that would have side effects we could do know about. ATM, we have a head and footer styles / scripts. I was wonder if we could add a enqueue after every set of blocks, so widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. blocks, post content and block theme. If it was an opt-in feature and all core blocks opt-in, that could go a long way.
    • @westonruter: Inlining I think is a no-go, for the reasons I identified
    • @spacedmonkey: Could we inline that at the start / end of post content?
    • @westonruter: That would probably resolve the issue with inlining breaking CSS selectors. But not all. For example, if you have div.entry-content > p:first-child, inlining would break this (edited). And if the CSS were at the end of the post content, then this would be the same problem as we have right now with the styles being printed in the footer: the potential for flash-of-unstyled-content
    • @spacedmonkey: So we need some other hook to output the scripts / styles in. Outside of the context of the content. In block themes we could add that but if might an opt-in for classic themes.
    • @westonruter: IMO, an opt-in for classic themes would take a long time to get adoption, and it doesn’t seem quite right if the future focus is on block themes. I’m not sure how the hook would work in practice either. Block themes are able to solve this problem by “output buffering” the content (not using ob, but rather just storing the content in memory for do_blocks). If output buffering could be used in classic themes, then we’d be able to hoist footer styles to the head in the same way, easily.

Our next chat will be held on Tuesday, May 9, 2023 at 15:00 UTC in the #core-performance channel in Slack.

#core-performance, #performance, #performance-chat, #summary

Performance Chat Summary: 25 April 2023

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

Announcements

  • Updated the cadence of 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. scrubs to be every 2 weeks – next one scheduled for April 26, 2023 at 15:00 UTC.
  • @flixos90 Also briefly sharing that I just published a performance retrospective post on WP 6.2 that I had been working on over the past few weeks: https://make.wordpress.org/core/2023/04/25/the-benefits-of-prioritizing-and-measuring-performance-in-wordpress-6-2/ It highlights some of the key aspects which changed in 6.2 in how we dealt with performance and also summarizes high level numbers. It can be seen as somewhat complementing https://make.wordpress.org/core/2023/04/05/wordpress-6-2-performance-improvements-for-all-themes/, at a higher level however without looking as much at specific improvements.
  • Discussion regarding the decoupling of the SQLite 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 from the performance lab work. In reference to this conversation that came up in a previous performance chat. Would love to have an open discussion about peoples preferences here and whether we do decouple this?
    • @olliejones I favor that approach. It will usually be deployedDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. independently of the stuff in PL.
    • @10upsimon I tend to lean more toward an agreement with @rmccue in that SQLite is not necessarily performance improvements focused (or at least that is not the primary goal), and probably belongs outside of the realm of the performance lab work.
    • @spacedmonkey To be clear, I think that performance team should continue to support SQlite getting into coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., to much sure it done in a performant way. But SQlite is not a performance benefit on the face of it, so it is confusing why we part of performance lab plugin.
    • @rmccue Yeah, that was basically my thought; I think it’s beneficial all-round to separate it out (but with performance still consulting as @spacedmonkey says)
    • @olliejones yes, having SQLite headed for core is good. I believe the issue is about monorepo and multifunction plugins on the one hand and a separate repo and plugin on the other.
    • @aristath I agree with what was mentioned above 100%. SQLite can be related to performance, but is not in itself a “performance” module/plugin. It should be developed in collaboration with the performance team since it can have a big impact, but I’d vote to decouple it from the performance-lab plugin
    • @olliejones Maybe in a parallel universe or another year, there can be a separate database team. But for now the perf. team has the talent.
    • @spacedmonkey If you want to setup a meeting for a database team, that could work. Many component meetings have less than 5 people.
    • @flixos90 To clarify, this conversation is slightly different and mostly unrelated to the “unbundling Performance Lab plugin” effort. While we are publishing other PL modules as standalone plugins, those standalone plugins will still be directly associated with the performance team, developed in the monorepo, referenced from the PL main plugin etc. Removing / decoupling SQLite from PL would be different: We would still support getting the plugin towards WP core of course, but it wouldn’t be in any way connected to PL anymore. Maybe that was clear, but just in case.
    • Next steps clarification:
      • @aristath I think the only thing to do here would be to remove the module from PL, and add a notice so in case the user previously had the module activated, they’ll be prompted to install the standalone plugin
      • @joemcgill I assume we’ll remove the module from the performance lab plugin in the same release where we remove other modules. How we handle the transition so as to not break any active sites, is not clear to me at the moment.
      • @olliejones Do we have any usage telemetry to help guide that decision?
      • @flixos90 Potentially. As mentioned, I think this conversation is decoupled from the general PL unbundling effort, so we could do it at the same time, but also sooner. I would love to find a way to make the transition smooth though. For sites that already have the SQLite module active, we should probably recommend activating the SQLite plugin before deactivating the feature.
      • @aristath That’s a good idea…
      • @flixos90 Has anyone tried yet to activate the SQLite standalone plugin on a site where the PL SQLite module is already active? We need to make sure it doesn’t throw fatal errors
        • @aristath Adding it on my TODO list for tomorrow, though from what I recall I tried it last month and I there were no issues. I’ll need to test that again just to be sure, it’s been a long time
      • @10upsimon I feel strongly about not intentionally breaking users sites, however few are using it. Perhaps we need to defer the removal to 2 versions from now, and raise a notice or similar in the adminadmin (and super admin) making it very clear that from version n it will no longer be supported as a core PL module.
        • @flixos90 agreed @10upsimon adding though that for a smooth transition the plugin should be activated before deactivating the PL module, so we have to make sure that that is actually possible
      • @joemcgill A similar transition plan will be good for all of the modules, to be honest, even though SQLite is the most critical due to potential breakage.
      • @flixos90 @joemcgill I think for the other modules we’ll handle that in a central effort as part of unbundling, but with SQLite it will now be bit different, since that plugin will not be referenced directly from PL in the future. But I agree it’s most critical there to have a smooth transition since switching back to a MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. / MariaDB database accidentally will break any site that actually relies on SQLite right now

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @spacedmonkey I landed lazy loading term metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.
    https://github.com/WordPress/wordpress-develop/commit/2c6bf77a9e7532c6ac3a03502b44d108cae86179
    • I hope to get comment meta in the next week.
      https://github.com/WordPress/wordpress-develop/pull/4128 – Code review welcome
    • Related to term meta, https://github.com/WordPress/wordpress-develop/pull/4259 also need code review
    • This saves around 15k calls to sanitise term function per page load
    • TLDR, there was no need to call get_term , we already had the term id, so just remove that
    • I also reviewed this – https://github.com/WordPress/wordpress-develop/pull/4097 (amazing work @oandregal)
    • @joemcgill This is a huge one that I had noticed in my profiling research, so nice to see this already addressed!
    • @10upsimon Call me cheesy, but 15% server time alone across many WP hosts is a positive contribution to the environment alone
    • @mukesh27 With all this improvement, 6.3 is faster than 6.2
      • @flixos90 Yeah, this alone will make 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. theme performance in 6.3 almost as much faster as it got faster in 6.2
    • @flixos90 Certainly the highest performance improvement in a single PR that I’ve seen so far
    • @joemcgill Worth noting that the 15% improvement on that PR is compared against WP 6.1.1, not the commit prior to that one, so it would be interesting to A/B against the commit prior (if I’m reading the workflow correctly)
      • @flixos90 No, the 15% is against today’s trunk. The original metrics on the PR are incorrect, but then I measured it against trunk and that’s where the 15% come from

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon Regarding “Enhancing the WP 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. with a Loading Strategy”:
    • We’ve had a good amount of feedback and iteration on our draft PR
    • We’ve had some valuable feedback come in this week, so we’ll be addressing that with the goal of opening a PR against core later this week. Thanks @joemcgill @adamsilverstein and @westonruter for the invaluable feedback thus far (and to @spacedmonkey)
    • We’ve established a mostly approved documentation plan/roadmap, with slight ongoing tweaks thereto. Draft documentation and documentation updates can commence soon
  • @flixos90 One more thing regarding JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. & CSS, last week I opened https://github.com/WordPress/gutenberg/issues/49927 to optimize how block CSS is loaded in classic themes (it’s great in block themes, but not so much for classic themes, and we can probably improve that). There have been some great conversations on that. @aristath has pointed out a detailed code example with how we could improve this by printing inline styles per block type right before the first block of each type is rendered

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • No updates this week

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @joemcgill I’ve been working to prioritize a set of “next steps” for automated performance testing. For me, the “next step” is to turn these tasks into tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets that we can address as capacity allows.
    • One of the big ones is to improve the stability of the results and make them more atomic, so we can use them to evaluate specific PRs (like the discussion we had earlier about the get_block_templates PR)

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @flixos90 We’re still waiting to get the Fetchpriority standalone plugin approved, beyond that and then the same for Dominant Color, we have basically completed the work for “Milestone 1” in https://github.com/WordPress/performance/issues/656
  • @flixos90 Separately, we need to explore what we want the user experience for “Milestone 2” to look like, both in terms of the regular UIUI User interface of the PL plugin going forward (in which it controls certain plugins as well as the Site Health modules), and for a smooth migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. from the modules to remove to their standalone plugins

New Projects / Proposals

  • @spacedmonkey I would love feedback on – https://github.com/WordPress/performance/issues/718 a new module proposal for adding object caching information to site health
    • I want to make it easier for users to understand what kind of object cache they are using and what features it supports.
    • Specially if your object cache drop in supports multiple gets. I got a lot of questions after this article was published.

Open Floor

  • No updates

Our next chat will be held on Tuesday, May 2, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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

Performance Chat Summary: 18 April 2023

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

Announcements

  • 2.2.0 was released yesterday
  • UPDATED from agenda: fetchpriority standalone 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 is still under review (not ‘approved’ as originally thought)

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @joemcgill Happy to say that I’m back from some time off with two fully working arms, and am hopeful I’ll be able to publish some results from the profiling research I was doing earlier.
  • @spacedmonkey I have been reviewing @aristath autoloading PR. It is nearly there.
  • @flixos90 What about the performance implications of autoloading? I believe that was still an open question in regards to whether we should move forward with this
    • @spacedmonkey Autoloading massively improve RAM usage. CPU, it is a little benefit at the moment.
    • @flixos90 Obviously autoloading is a best practice, but I think we still need to assess what really are the benefits of it in WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Are there any benchmarks for those statements yet?
    • @johnbillion There were some numbers on the PR but they could do with being updated
    • @spacedmonkey https://github.com/WordPress/wordpress-develop/pull/3470#issuecomment-1490083546
    • @flixos90 That’s a single profile though, right? There is so much variance in load time data, I think we need to do something a bit more comprehensive for the timing metrics. The 5.5 MB -> 5.15 MB looks promising though
    • @spacedmonkey I haven’t done a tonne of benchmarking yet, it is a WIP.
    • @flixos90 That’s fair, though I think we should do that sooner than later to be confident that this is actually a beneficial change for WordPress core. Also best to use medians from all the results
    • @spacedmonkey What is the KPI here? CPU usage, response time, ram usage?
    • @joemcgill Has there already been a merge proposal created for this change? Seems like something that would need broader communication and would be an opportunity to include performance data alongside the technical details?
    • @johnbillion Would be good to see separate metrics for front end, wp-adminadmin (and super admin), REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/., too, hopefully improvements all around
    • @spacedmonkey I am happy to run all those tests and provide data. As I say, it is WIP at the moment. I will wait until @aristath gets back to me and says it is good for a full review

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon Regarding “Enhancing the WP 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. with a Loading Strategy”:
    • Iteration is underway following the code review completed by several WPP team members
    • This is now ready for another round of review here

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • No updates this week

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @joemcgill I’m starting to collect some ideas for enhancements to the initial automated performance workflow we added last release and would be happy for any suggestions folks here have.

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger for the Plugin Checker, we’re working through the issues raised as part of the milestone 1 Review/QA and making good progress. We’ll continue to be working through these as over the coming weeks. Progress can be seen on the GitHub repo here. Feel free to take a look and leave any thoughts/ideas you may have there. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @mukesh27 I continue working on some follow-up issues and milestone 2 tasks
  • @flixos90 At this point for milestone 1 we’re just waiting for plugin repo approval, then we can go ahead and publish the outstanding plugins Fetchpriority and Dominant Color Images
  • @flixos90 We may also want to start coordinating how we’re going to re-integrate the SQLite repository into the monorepo, cc @aristath
    • For the latter, we would be good to publish from the WordPress/performance repository any time now since the main effort has been completed
    • @joemcgill Seems like that should be handled before we release a version of the performance lab plugin that removes the related module
    • @flixos90 Absolutely, that would only be part of Milestone 2
    • @flixos90 asked @aristath Do you have an update on https://github.com/WordPress/performance/pull/677? Is that ready for another review?
    • @flixos90 I wonder what is left beyond the above PR in order to sync the two codebases. At some point soon we should probably code-freeze the standalone GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ repository and make WordPress/performance the source of truth again, that way we’ll work in one codebase only, and we can publish from there a new version to WP.org any time

New Projects / Proposals

  • @spacedmonkey I am looking into the autoloaded options in WordPress. I am just getting up to speed.
    • Wonder if anyone here, as any thoughts on the matter. Articles, plugins or other work arounds I should look at as part of my research
    • One route I am looking into, is stop using the single autoload cache key and make it so each option using it’s own cache key. We can now use wp_cache_get_multiple to prime all autoloaded caches in one go.
    • @joemcgill Have we done any research into how many WordPress sites are able to make use of the benefits that get/set_multiple functions provide?
    • @spacedmonkey I have been looking at differnt object caching plugins
    • Sadly, many of them do not seem to implement wp_cache_get_multiple
    • But many of these are the list have not been updated in 5+ years, it is hard to know if they are still being used. I made a mega list – https://github.com/stars/spacedmonkey/lists/object-caching-plugins
    • @joemcgill Nice. I think it would be good for us to keep track of those numbers. Not that this should keep us from trying to optimize the caching of options, but it would help us better understand impact and ensure that any changes we make to support multi-cached options don’t create a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. for folks whose hosting doesn’t support those features.
    • @spacedmonkey memcache and redis support multiple gets, it is just a matter of updating plugins to support it as well. We have wp_cache_supports in core. I wonder if we could get any data from that. We have some sites on WordPress sites php etc.

Open Floor

  • No updates

Our next chat will be held on Tuesday, April 25, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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

Performance Chat Summary: 11 April 2023

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

Announcements

  • 2.2.0 release date will be Mon April 17

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • No updates this week

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

  • No updates this week

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon Regarding “Enhancing the WP 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. with a Loading Strategy”:
    • Holistic code review has been completed by several WPP team members
    • Feedback has been provided within the draft PR and feedback is being transformed into GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ issues
    • Some of these issues have work already underway against them
    • Consensus is a positive attitude all around toward the end result overall
    • Functional testing has been complete, but is being extended slightly so that testing is done alongside some key performance plugins. This is mostly to aid documentation (planning) efforts and validate earlier findings
    • Documentation plans are underway and being drafted, which include inline and coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. documentation (as well as core community comms)

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • No updates this week but @adamsilverstein will be watching data on how our recent core 6.2 lazy loading improvements work and report back here once there is data available

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @mukesh27 There are no major updates this week, but myself and @joemcgill started brainstorming on the next step for Automated Performance Tests. I will share more updates in the coming week.

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger We have completed Architectural Review and QA for the initial infrastructure of 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 Checker. We’ve created a number of issues to tackle the improvements and bugs that came out of the testing which we will be working through over the next couple of weeks. Progress can be seen on the GitHub repo here. Feel free to take a look and leave any thoughts/ideas you may have in the repo. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

New Projects / Proposals

  • No updates

Open Floor

  • No updates

Our next chat will be held on Tuesday, April 18, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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

Performance Chat Summary: 4 April 2023

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

Announcements

  • 2.2.0 release date will be Mon April 17

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @aristath shared an update ahead of time:
    • Autoloader: Work continues on https://github.com/WordPress/wordpress-develop/pull/3470 to add a PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher autoloader in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. The results so far are encouraging and all tests (both manual and automated) has shown that performance is better and there are no apparent drawbacks. There are still a few minor things to polish, but it’s looking good so far.
    • L10nL10n Localization, or the act of translating code into one's own language. Also see internationalization. Often written with an uppercase L so it is not confused with the capital letter i or the numeral 1. WordPress has a capable and dynamic group of polyglots who take WordPress to more than 70 different locales.: Experimenting with different approaches and methods to refactor the way localization works in WP, in collaboration with @sergeybiryukov, @afercia and @poena. Still in the early stages of exploration, trying to find ways and methods to make the process more performant.
  • @joemcgill One thing that I wanted to bring up, was this post by @swisspidy about the new translations functionality he’s been working on. He has specifically asked for some performance help in that post, and I think it’s something that our team should take a look at. In the server timing research that I have been doing, I have found that processing translations can be a performance bottleneck for classic themes, specifically, so it would be nice if we could both help with this effort and improve performance overall for translated sites.

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon for Enhancing the 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. with a loading strategy
    • All work is now contained within our base feature branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".
    • An holistic code review process is underway, where we’re going over all code contributed as part of this work and reviewing it in a single PR against trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision.
    • Functional testing to follow on from the code review completion
    • Inline documentation review will follow from that

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @flixos90 No major updates from my side, still working on assessing the best path forward for enhancing the lazy-loading logic in core, which will also benefit fetchpriority. I feel I’m close to opening TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets, but also noting that I’ll be AFK next week, so it’ll probably only in ~2 weeks from now

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @mukesh27 No major updates, @joemcgill I and started brainstorm on next step for Automated Performance Tests

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger We have completed the initial infrastructure for 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 and have moved onto testing! This week we have started reviewing the infrastructure holistically and begun QA testing. Once testing is complete we will start work improving upon the initial architecture and moving towards building out the additional checks. Progress can be seen on the GitHub here. As always, feel free to take a look and leave any thoughts/ideas you may have in the repo. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @mukesh27 We finished engineering for Milestone 1 tasks and all PRs in final review. If anyone has some capacity please review. We are plaining to release our first WebP Uploads plugin soon.
  • @flixos90 +1, if we can get those final PRs merged tomorrow, the idea would be to publish the WebP Uploads standalone plugin on Thursday with the new automated workflow (which deploys the plugin based on the same codebase that the module uses)
    • Hopefully that all works out. Once the plugin is successfully released, we can proceed with the other ones (Dominant Color, Fetchpriority), and last but not least unify the currently 2 codebases from the SQLite plugin

New Projects / Proposals

  • No updates

Open Floor

  • No updates

Our next chat will be held on Tuesday, April 11, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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

Performance Chat Summary: 28 March 2023

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

Announcements

  • None today

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

  • @spacedmonkey worked on several tickets:
  • @aristath work continues in the SQLite project – as well as the php autoloader for wp-core
  • @joemcgill I’m just wrapping up an initial round of profiling observations, and plan to have something written up to share soon. Some highlights are that there are lots of places where we could try to reduce the use of file system reads associated with 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. registration and template rendering that we wanna look into. There is also a potential opportunity for some improvements to the way translations are being handled and classic seems that we also want to review.
    • @spacedmonkey already has some fixes in the works for some issues we discovered while comparing notes. I continue to be somewhat hampered by only being able to use one arm, but I’m working through it.
    • @rmccue As an aside, I noticed that the method of merging translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. files in memory is probably suboptimal and we might be able to avoid that. (I’ve been reimplementing pomo in native code, and noticed it there)

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones @rjasdfiii

  • @olliejones Work continues on SQLite, next is to load woocommerce and beat on it.
    • Future project: identify as many places in core where the SQL is non-portable MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. specific stuff and work on making it standard. Should that be a TRACTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker.?
    • @joemcgill I definitely think that having trac tickets that describe any improvements you’d like to see made would be useful.

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/. & CSSCSS Cascading Style Sheets.

Link to roadmap projects

Contributors: @mukesh27 @10upsimon @adamsilverstein

  • @10upsimon We are addressing the issue(s) around script concatenation, work is in progress and in the final stages of review, with minor iterations ongoing. Unit tests are being implemented to validate the approach and should be ready for final review today or tomorrow.
    • We are entering into a more holistic/overall code review of work done to date, essentially a code review of all work done thus far as part of the epic. Minor iteration is anticipated as part of this review process and will be executed as required.
    • Work can be seen here
    • Various tests/testing scenarios will be undertaken prior to submitting a final pull request against.

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @flixos90 I have been continuing on the lazy-loading exploration and am getting close to opening Trac tickets for the individual pieces of work
    • To clarify, this is about avoiding to lazy-load LCP images, or rather in-viewport images in general
  • @flixos90 I have also been thinking a bit about the fetchpriority="high" feature for which we already have a module. One thing that we may need to iterate on there is that it just adds the attribute to whichever first image doesn’t have loading="lazy". This is not terrible, but it’s also probably not the best way to go about it, since the two attributes should not simply be mutually exclusive. The guidance is rather:
    • fetchpriority="high" should be only on the LCP image.
    • loading="lazy" should be omitted on images above the fold (i.e. potentially more images than just the LCP image).
  • @joemcgill I am in the very early stages of looking into ways we can improve the way WordPress calculates the sizes attribute.

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • No updates

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger

  • @joegrainger We have 2 tasks remaining for 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 Checker infrastructure with plans to complete this week. Once done, we will start performing initial testing and review  the infrastructure holistically before working on the additional checks. Progress can be seen on the GitHub repo here. As always, feel free to take a look and leave any thoughts/ideas you may have in the repo. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

New Projects / Proposals

  • @spacedmonkey Just flagging, I want to get the core unit tests running against redis. In my research, more hosts are using redis then memcache, so we could test against this and change our thinking of object caching in WP space from memcache to redis https://core.trac.wordpress.org/ticket/58000
    • @olliejones fwiw the SQlite Object Cache plugin has extensive perf. instrumentation built in.

Open Floor

  • @rmccue Re SQLite, I’m moderately concerned about the potential performance impact that introducing another layer of abstraction may introduce there. A traditional reason that WP hasn’t been DB-independent is because of (theoretical) performance gains by tightly coupling the two and taking advantage of that. (Which are assumptions I think do need to be tested.) I realise I’m coming in late to this, but I guess I’m just not seeing how the SQLite work ties into performance specifically. (I see a clear case for the non-performance benefits.)
    • @aristath Well, I admit that the tie between SQLite and performance is a bit weird… but the way I see it, it comes down to this: on a small, lower-end server, the server’s resources are shared between a php server, apacheApache Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation. Apache is an Open Source software available for free., and a MySQL server. By using SQLite, the server can allocate its limited resources to php and therefore achieve better performance.
      It’s better for sustainability mostly, and for performance on smaller sites (that usually are hosted on cheap servers) the performance gains will be there
    • @rmccue I can see how eliminating the latency and translation between two separate servers for PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and MySQL could help performance, not sure of the overhead if it’s on the same server; that said, it feels like the primary goals of the project are not performance related
    • @olliejones It might ??? be a good idea sometime to spin off a team to do dbms-independence work, the target of which would be support for SQL Server, postgreSQL, SQLite, and, gag, Oracle. Having those would help scale up WordPress sites. postgreSQL especially because it can do wildcard searches with indexes. But that imaginary project’s connection to this team is a bit tenuous, as you mention.
    • Discussions here continued beyond the end of the meeting

Our next chat will be held on Tuesday, April 4, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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