[go: nahoru, domu]

Page MenuHomePhabricator

Launch on-wiki page performance inspector
Closed, ResolvedPublic

Description

Background

We want to make it easier for editors to know if there are things to be done to make the page faster for the user. Lets focus on things that an editor can change and give info about that.

How

Lets start by setting up a structure that works and add metrics one by one. Here's the list of things we can start with when we have the structure ip and running:

  • Show sizes for different modules and matching CSS (use what we have today in mw.loader.inspect())
  • HTML and image sizes. Warn for large images.
  • Show the backend time (how long time it takes for the server to serve the page) and compare with median time for all pages
  • Include the NewPP report T110763
  • Check if the the page in the slow parse log T98563
  • List of Lua module invocations + runtime (see T117173)
  • Estimate how long would it take this page to load on a 2G connection/test on WebPageTest?

More open tasks relating to Performance Inspector:
https://phabricator.wikimedia.org/maniphest/query/9yjiHVNjZEBO/#R

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Cool. I've started with a rule system for sitespeed.io that we can use or rather re-use the structure, meaning we can create our own rules, with limits and suggestions. It's almost like YSLow :) Actually it will be good and give us a nice way of structuring the code.

I'll start adding subtasks.

What kind of browser support should we have for this, work on all current I guess? Firefox nightly now support resource timings 2 so you could get asset size direct from resource timings, thats nice. Else we need to do an extra request per asset, but that's ok.

How long would it take this page to load on a 2G connection?

Slow, medium, fast? :)

Adding this summary to make it easier for me to focus on the right things. Here's a summary of metrics/data to collect:

  • Use what's included in mw.loader.inspect()
  • Image size/number of images/size of the HTML
  • Include the NewPP report T110763
  • Backend time and how we do against median time
  • Is the page in the slow parse log T98563 (I need to discuss how to solve this in a performant way)?
  • List of Lua module invocations + runtime (see T117173)
  • How long would it take this page to load on a 2G connection/test on WebPageTest?
  • Metrics from nav timing/user timing/resource timing, in the future we could use these metrics to indicate that somethings is wrong/can be done better.

Then we need to display it:

  • At the top we should have a summary of suggestions of what to improve, so its easy to focus on what's most important.
  • List all different metrics

Other requirements:

  • Make it easy to add new metrics and make sure it can be picked up by the summary.
Peter triaged this task as Medium priority.Feb 10 2016, 7:48 AM
Imarlier subscribed.

Needs followup with the Community Liasons team to figure out where/how to expose this when enabled on production.

Krinkle renamed this task from On-wiki page performance inspector tool to Launch on-wiki page performance inspector.Jan 23 2018, 12:03 AM

Blocked on CL team. Which isn't a big deal, given that this ticket is sightly over 2 years old and they've only had a couple of days...

I've added an item to Tech/News that reads:

The Performance Inspector will be available as an opt-in user preference in the Editing section. It shows related information from different parts of MediaWiki for a specific article.

Please edit boldly to improve that if it is inaccurate or unclear. It will be frozen by early Friday UTC (so that translators have Fri/Sat/Sun to work on it).

Any help adding more details/examples/screenshots to the user help page would also be appreciated. I'll mark that up for translation once it is a bit more detailed.

@Quiddity I was previously under the "Beta Feature" section of the Preferences on Beta Cluster. It is now going to under a new ""Developer Tools" heading of the "Editing" section instead, and also being being promoted from Beta Cluster to production.

The (otherwise unrelated) preference for "ParserMigration" extension was also moved to this Developer Tools section. For an overview of the Gerrit changes related to this, see T129322#4152371.

However, I'm not sure it should be in Tech News yet given PI is only on Beta Cluster at this time. I haven't seen a patch or schedule for production, although it does seem production-ready indeed. EDIT: Never mind, missed T129322#4158710.

@Krinkle Nod. Do you think any of that needs to be directly written in the Tech/News item? I didn't think it was crucial to understanding, hence left it out. Note also that Imarlier has kindly expanded the blurb so it has more details about the features of the tool.

Also you might be able to help with my specific questions about the docs, at T186260#3951557 - I think the page needs more details on what users can specifically do, for the Action sections. Possibly screenshots too. I could take&upload images, but I'm not sure which pages make good examples of the various aspects. Suggestions or direct edits appreciated. https://www.mediawiki.org/wiki/Help:Extension:PerformanceInspector

@Imarlier To add notes from 2018 offsite discussion.

Krinkle claimed this task.

Mostly done. Anything remaining has been cancelled in favour of T194684: Migrate Performance Inspector from GUI to console, which will be developer-only through the browser console.