Page MenuHomePhabricator

[Spike] Compare MachineVision performance metrics before and after Vue.js port
Closed, DeclinedPublic

Description

Porting over the existing MachineVision front-end from OOUI to Vue.js (without changing much in terms of design or functionality) gives us an interesting opportunity to do some real-world performance comparisons of the two approaches. And since this is a nice but not mission-critical feature, I feel like we have a little bit of room for experimentation that could inform more high-stakes projects down the road.

Payload Size
This is the simplest thing to measure but also probably the least informative. Modules were fetched locally in isolation using these request params:

/load.php?modules=ext.MachineVision&skin=vector&lang=en&debug=false

ModuleMV ClassicMV Vue.js
ext.MachineVision58.86KB66.05KB
vue0KB91.90KB
vuex0KB10.15KB

So the Vue.js version is about 109.24KB heavier than the "classic" version. Of course, the Vue.js version still has to load all the original OOUI/OOJS dependencies, since we are still relying on OOUI widget modal dialogs (this is because we don't have a global, Vue.js-compatible equivalent of WindowManager / ProcessDialog yet, and creating one here was out of scope).

The oojs-ui-windows module weighs 51.91KB, and oojs-ui-widgets itself is 106.01KB – if we were able to move away from OOUI-based process dialogs here then the comparison would start to look much more favorable.

Lighthouse metrics
According to Google Chrome's Lighthouse feature, here's the current breakdown for the desktop version of Special:SuggestedTags on production Commons:

MetricMV ClassicMV Vue.js
First Contentful Paint1.1s
First Meaningful Paint1.1s
Speed Index3.6s
First CPU idle4.2s
Time to Interactive4.7s
Max Potential First Input Delay510ms

Other key metrics?
TBD

@Krinkle and @Catrope I'd love to hear any recommendations you might have on other key metrics that would be good to try to capture before and after we deploy the Vue.js port (which we're aiming to don in the next 1-2 weeks).

Event Timeline

egardner updated the task description. (Show Details)
egardner moved this task from Incoming to Doing on the Structured-Data-Backlog (Current Work) board.
egardner updated the task description. (Show Details)
egardner added subscribers: Catrope, Krinkle.

Screenshot and JSON output from the first Lighthouse test ("classic" version on prod commons):

Screen Shot 2020-05-11 at 3.06.14 PM.png (2×2 px, 501 KB)

It's going to be some time before we are able to re-write the front-end of this extension to remove all OOUI dependencies; this may happen if we port it over to a new WMF component library at some point. Closing for now.