Page MenuHomePhabricator

Release memory of in-transport format for executed bundles in mw.loader
Open, MediumPublic

Description

We currently stored the in-transport mw.loader.implement format of modules memory as part of the registry. To my knowledge there is no need for this, except for mw.inspect.

The addition of implement properties in implement() to the registry, also means the shape of the our internal module objects changes at run-time which probably isn't ideal for JIT performance.

Proof plan:

  • On a local wiki with various extensions (e.g. Vector, WikimediaEvents, MediaSearch, VisualEditor, MultimediaViewer), measure page load performance of key experiences (regular page view with media viewer open, VE editor open, MediaSearch landing page), and measure memory with in-browser tools. On Safari (Emulate iOS mobile), Firefox, and Chrome.
  • Hack execute() to release memory.
  • Measure again and determine if there are meaningful and improvements.

Actual plan, if meaningful improvement is found:

  • Finish bare minium work on debug=2, so that it is super fast by doing concat only (no minification, and no separate file requests). Tracked at T85805.
  • Update mw.inspect to be allowed in debug=2 mode (right now it is disabled for debug mode, because the data is generally not stored in debug mode), and disable use of mw.inspect outside debug mode.
  • Update execute() to be memory friendly by default, and only hold on to values in debug mode for mw.inspect.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript