Performance Chat Summary: 11 July 2023

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

Announcements

  • Welcome to our new members of #core-performance
  • WP 6.3 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 is today
  • Working on a WordPress 6.3 performance highlights post – please add suggestions to the document by July 21
  • Work continues on dev notesdev 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. for 6.3

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones

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 @westonruter

  • @10upsimon 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:
    • A draft 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. is in progress and I believe almost ready to be published, huge shout out to @flixos90 @joemcgill and @westonruter for their invaluable contributions thus far
    • I’ve reached out to the documentation team around how to submit changes to Dev Hub pages, and have begun drafting potential documentation updates that will need to happen that are exclusive of the automated updates, with the goal of having those ready for review by latest mid week next week. Thanks @stevenlinx for pointing me in the right direction.
    • Worth noting that auxiliary documentation efforts (docs not auto generated from code) have reduced somewhat following removal of deferred inline scripts
  • @spacedmonkey Created this ticket, for remove hardcoded style tags https://core.trac.wordpress.org/ticket/58775
  • @westonruter I’ve started exploring where script strategies can be used in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and 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/. I don’t have a further update just yet but hope to have either a doc or set of tickets by next week.
    • @joemcgill We should take a look at default themes too. Let me know how I can best support
    • @westonruter Yes, I mean to include that in core
    • @spacedmonkey I wonder if it could be used in the performance lab and 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 plugins as well.
    • @westonruter Some of the changes may make sense as a module in PL first
  • @10upsimon Although, I did do a performance comparison on a draft PR that @thekt12 had added based on this slack discussion  and followed up in the thread, we agreed to pause on this for now and re visit it shortly with a broader script tree.

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27 @swissspidy

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger @mukesh27

  • @mukesh27 We are working on the last issue for Milestone 2 for the Plugin Checker. Once complete we’ll be moving onto further QA/Testing and remediating over this week and next. 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

  • No updates this week

Open Floor

  • @adamsilverstein I opened a new ticket to consider adding lazy loading to oEmbed iframes: https://core.trac.wordpress.org/ticket/58773 – although iframes are lazy loaded by default now, oEmbeds are not included in that
    • @spacedmonkey Could lazily loading iframes have issues around tracking? Some embeds, like say a video provide, like iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser. to load, so they can have view counts.
    • @westonruter Embed iframes wouldn’t be used for tracking, I wouldn’t think. If the video is never played then the view count shouldn’t increase, right? So same as if it wasn’t loaded.
    • @adamsilverstein possibly, they would no longer load if they are off screen and never scrolled near the viewport
    • @spacedmonkey What if a video is auto playing? You could build your website for your youtube channel to have a post blogblog (versus network, site) for each video. In that case you would want it to autoload play
    • @westonruter Note that autoplay with audio doesn’t work on mobile
    • @spacedmonkey Autoload is only really a problem for ads. Autoload for a site where the user wants to see the video is differnet. On youtube, I would want to a video to autoload when I click on the video.
    • @westonruter There may need to be a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. or documented way to turn off lazy load. However, if the video intends to autoplay then it should be in the first viewport, and thus it shouldn’t get loading=lazy anyway or it would load right away anyway. I don’t think we should worry about the case of an autoplay video being lazy-loaded that isn’t in the first viewport.
    • @spacedmonkey The embed code from youtube doesnt have lazy load attribute. Why is that the case?
    • @adamsilverstein there is an existing filter that can be used wp_iframe_tag_add_loading_attr 
    • @westonruter That’s a good question. I have been looking into that but haven’t found a reason yet.
    • @spacedmonkey Vimeo also doesn’t have lazy loading attributes. I feel like the embed provider wants to have them lazy load, they would.
    • @adamsilverstein we’ll need to test every embed type of course. i’d love if that were true, but providers aren’t doing that
    • @westonruter These video providers predate the introduction of loading=lazy. Could be they just haven’t added it yet. Better for core to add anyway, because then we can omit from videos in the first viewport.
    • @spacedmonkey I think this functionality should have a merge prospal and get feedback from the community. I know for a fact, I have using video providers that use iframe and needed the video to load to mark as an impression. Having a filter is all good. But that means that video provide X needs to create a plugin to use the video to opt out.
    • @westonruter Why should an impression be given if the video is never in the viewport?
    • @adamsilverstein we already announced and discussed oEmbeds would be lazy loaded in this post – https://make.wordpress.org/core/2021/02/19/lazy-loading-iframes-in-5-7/ we later reverted the change due to technical issues. lets start by discussing the tracking concerns on the tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticket
    • @spacedmonkey Can we explore this idea as a module in the performance lab? That way we can have people test this functionality.
    • @adamsilverstein Absolutely, great idea! Here is the code needed to add the same functionality in a plugin – https://gist.github.com/adamsilverstein/e280062004c38629fc029b6d267bff91
    • @spacedmonkey Being able to test things like this is the point of the performance lab plugin. We can get feedback from the community that was as well.

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

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