Performance Chat Summary: 28 November 2023

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

Announcements

Priority Projects

Server Response Time

Link to roadmap projects and link to the GitHub project board

Contributors: @joemcgill @swissspidy @thekt12 @mukesh27 @pereirinha

  • @joemcgill Main thing happening here at the moment is the ongoing template loading work, captured in this tracking issue
  • @thekt12 Did some profiling for #58196 Performance metrics didn’t show any improvement which is kind of not what was observed in blackfire. https://github.com/WordPress/wordpress-develop/pull/5281#issuecomment-1830164940
    • @joemcgill That’s interesting. I wonder if it’s due to profilers like Blackfire not getting the benefits of the opcode cache? I can try to reproduce locally
    • @thekt12 I am not so sure about that. May be you could try and see what you observer.
    • @joemcgill Will do. I like the removal of the file_exists check and memoizing the path list regardless, so we may want to commit this anyway as a test to see if we could cache this for longer than the current request?
    • @thekt12 Yes we can do that
    • @johnbillion Last time I did some profiling with Blackfire I also saw a very different scale of improvements compared to profiling the code in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher without it. It has a much greater overhead than I expected.

Database Optimization

Link to roadmap projects and link to the GitHub project board

Contributors: @mukesh27 @thekt12

  • @mukesh27 I worked following PRs:
  • @thekt12 not a performance related thing but still something introduced by caching #59661
    • 2nd scenario in this – https://core.trac.wordpress.org/ticket/59661#comment:7 is something I feel is hard to solve, I just wanted to know do we add dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. in such a scenario.
  • @pbearne Mad Idea (may not be new): Could we store all the files in site in a cache and then only check file exists if not in cache and invalidate when we fail to open a file that cache said it had and was missing
  • @joemcgill file_exists checks have shown to really not be that expensive in production due to the opcode cache, but there are places where we could avoid using them and instead read the file in a try/catch 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. and handle the errors gracefully.
  • @joemcgill For longer-term caching of file content that is expensive to read and parse (e.g., block patterns, etc.) this issue is worth following: #59719

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 and link to the GitHub project board

Contributors: @mukesh27 @westonruter @flixos90

  • @joemcgill Last week I resolved #58632 as maybelater based on @westonruter analysis that showed that >86% of inline scripts are printed before the script they’re attached to, so making inline scripts deferrable do not seem like a priority for now. Better to document for developers how to use this feature in a way that ensures they’re not forcing their scripts to be blocking. I think we can conduct another analysis in the future to see how often async/defer scripts are being downgraded to blocking scripts due to this problem, using the data-wp-strategy attribute we add to mark intended strategy for debugging purposes

Images

Link to roadmap projects and link to the GitHub project board

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill @pereirinha @westonruter

  • @westonruter Image Loading Optimization is now working end-to-end! After the pull requests for detection and storage have been merged, I’ve now got drafted a PR for the optimization piece. It’s nearing ready for review, hopefully today.
  • @joemcgill I’ve got a draft of a proposal for updating our default sizes attribute in progress using the layout properties from theme.json an observation is that it would be really nice to find a more declarative way to understand the root padding values that are currently referenced in theme.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. by their CSS variable names. Not sure if anyone is aware of any other conversations related to that idea that have been started elsewhere.
  • @joemcgill Meanwhile, I noticed several places where 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/ is setting images as background CSS, where our optimizations are not being applied. That could be worth an exploration to see how we can optimize.
  • @westonruter I’m intending to target this as well with Image Loading Optimization
    • @joemcgill I can open a tracking issue in our performance repo
  • @westonruter At the moment it’s just targeting img elements to optimize, but it has the pieces to also preload background images.
  • @joemcgill I’m more concerned about the use of very large file sizes, but proper resource hinting would be good to handle as well
  • @swissspidy Speaking of very large file sizes, I’m looking into the client-side image compression work in GB, to see what can be done for 6.5
    • @dmsnell not sure if you know libvips or not, but I noticed they have a WASM build. it’s killer feature, in my opinion, is the ability to stream image operations and avoid loading entire large images in memory at once. Also it’s just a really high quality library

Measurement

Link to roadmap projects and link to the GitHub project board

Contributors: @adamsilverstein @joemcgill @mukesh27 @swissspidy @flixos90

  • @adamsilverstein I’ve been working on getting 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 / automated performance testing adoption, making some slow progress
  • @joemcgill There was a strange issue with @mukesh27 PR earlier today. The Performance Test failed due to twentytwentyone not being available. There is a new PR running now that I’m watching to see if it also suffers from the same issue. Something we may need to triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. today

Ecosystem Tools

Link to roadmap projects and link to the GitHub repo

Contributors: @mukesh27 @swissspidy @westonruter

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • No updates this week

Open Floor

  • @adamsilverstein I have a couple of items. First, I wanted to share this Issue on WooCommerce – https://github.com/woocommerce/woocommerce/issues/41556 which reports some compatibility issues after they moved a script to the 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. and used defer (originally it was in the footer)
    • … after they adopted the script strategy feature
    • some of the issues may be fixed “upstream” or they may revert the change. in any case, I think it is interesting to see the challenges large plugins like this have making a change/adopting a new approach
  • @adamsilverstein 2nd: I have created a proposal for an oEmbed optimization module for the PL plugin – https://github.com/WordPress/performance/issues/888 appreciate any feedback
  • @pbearne #42441 has moved on, do we need a proposal for this to go into coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.?
    • @swissspidy To me that ticketticket Created for both bug reports and feature development on the bug tracker. is the proposal 
    • @flixos90 Yeah, I don’t think it needs a proposal. Just potentially further discussion on the ticket. I left some thoughts there last week
    • @joemcgill I’d like to get feedback from more folks outside this group. I’m still personally uneasy about making this decision without more input outside this group. I’d raise it in a dev-chat at minimum

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

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