Page MenuHomePhabricator

Pageview performance timeline analysis (March 2019)
Closed, ResolvedPublic

Description

T202154: Audit modules 2018: Reduce registry overhead | T121730: Audit use of @embed and remove where not needed (2019)


  • URL: https://en.m.wikipedia.org/wiki/Ian_Fleming.
  • Browser: Google Chrome 72.0.3626.121 (stable) on macOS 10.14.
  • Settings:
    • Mobile emulation: Pixel 2.
    • Network: 3G Slow.
    • CPU Throttling: 6x.
    • HTTP cache and other persistent data cleared.
trace.json (file size: 11 MB)

Related Objects

Event Timeline

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

Change 501821 merged by jenkins-bot:
[mediawiki/extensions/Score@master] ScoreHooks: Bundle configuration vars into JS that needs it

https://gerrit.wikimedia.org/r/501821

Change 502556 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/BetaFeatures@master] Reduce cost of 'wgBetaFeaturesFeatures' on every page view

https://gerrit.wikimedia.org/r/502556

Change 502565 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Popups@master] Remove redundant wgPopupsShouldSendModuleToUser variable

https://gerrit.wikimedia.org/r/502565

Change 502594 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/VisualEditor@master] init: Bundle wgVisualEditorUnsupportedEditParams with DesktopArticleTarget.init

https://gerrit.wikimedia.org/r/502594

Change 502647 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/BetaFeatures@master] Bundle model to client via packageFiles, rather than polluting all pages

https://gerrit.wikimedia.org/r/502647

Change 502556 merged by jenkins-bot:
[mediawiki/extensions/BetaFeatures@master] Reduce cost of 'wgBetaFeaturesFeatures' on every page view

https://gerrit.wikimedia.org/r/502556

Change 502772 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/CentralNotice@master] CentralNoticeHooks: Bundle configuration vars into JS that needs it

https://gerrit.wikimedia.org/r/502772

Change 503102 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Score@master] Bundle data values for mw.config with the JS module that needs it

https://gerrit.wikimedia.org/r/503102

Change 502772 abandoned by D3r1ck01:
CentralNoticeHooks: Bundle configuration vars into JS that needs it

Reason:
Waiting for a signal from @Krinkle after cleaning perf issues.

https://gerrit.wikimedia.org/r/502772

Change 502565 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Remove redundant wgPopupsShouldSendModuleToUser variable

https://gerrit.wikimedia.org/r/502565

Krinkle added a comment.EditedApr 12 2019, 9:21 PM

In the startup module:

"wgMainPageTitle":"Main Page",

Seems only very rarely used. Easily migrated in favour of wgScript or title= which defaults to Main Page, and is generally how this is done already (given only 1 usage in Codesearch, for ContentTranslation). Or where really needed, can be exported with the module that needs it, instead of on every page all the time.

Originally added in 2009 with cf75bdf4ba (r54384) and moved to the startup module in 2010 with a99f9ec28b9aa9d (r72772).


See T220926: Deprecate and remove mw.config wgMainPageTitle.

Change 503551 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/ContentTranslation@master] mw.cx.ui.Header: Bundle wgMainPageTitle with the module

https://gerrit.wikimedia.org/r/503551

(Also, I have no idea why Dutch is the global default for Score, but I'm not complaining.)

Change 503551 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] mw.cx.ui.Header: Avoid wgMainPageTitle for simple main page link

https://gerrit.wikimedia.org/r/503551

Change 502594 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] init: Bundle wgVisualEditorUnsupportedEditParams with DesktopArticleTarget.init

https://gerrit.wikimedia.org/r/502594

Krinkle added a comment.EditedApr 16 2019, 9:50 PM

In the HTML (on enwiki, and other wikis with FlaggedRevs installed):

"wgFlaggedRevsParams":{"tags":{}},
"wgStableRevisionId":null,

On many pages this empty boilerplate seems like something that can be omitted. In addition, for the pages where it isn't "empty", it should still be limited to cases where there is actually the ext.flaggedRevs.review.js module is loaded (which consumes these). Right now it is also set when that module isn't loaded (e.g. because the current page isn't flagged-rev'ed or because the user isn't a reviewer).


Fixed.

@D3r1ck01 Want to give the FlaggedRevs one a try? Involves a bit of JS as well.

Krinkle added a comment.EditedApr 16 2019, 10:10 PM

In the HTML on every page:

"wgRelatedArticles": null,
"wgRelatedArticlesUseCirrusSearch": true,
"wgRelatedArticlesOnlyUseCirrusSearch": false
  • wgRelatedArticles: Page specific, makes sense. Although emptiness should probably be optimised by omission, and make sure that it is only exported in the same context that loads the module that needs it. The onBeforePageDisplay hook handler in the same file has a lot of conditionals before deciding to load its module, which means these should probably be evaluated here as well.
  • wgRelatedArticlesUseCirrusSearch: Static config, not user or page specific. Should be bundled with the code instead.
  • wgRelatedArticlesOnlyUseCirrusSearch: Static config, not user or page specific. Should be bundled with the code instead.

Fixed.

In the HTML on all pages (for logged-in users):

"wgEchoInteractionLogging": true,
"wgEchoEventLoggingVersion": "1.12"

See T221151: Move Echo page-level data to something async (wgEchoInteractionLogging, wgEchoEventLoggingVersion)

Change 503102 merged by jenkins-bot:
[mediawiki/extensions/Score@master] Bundle data values for mw.config with the JS module that needs it

https://gerrit.wikimedia.org/r/503102

Change 504555 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Score@wmf/1.34.0-wmf.1] Bundle data values for mw.config with the JS module that needs it

https://gerrit.wikimedia.org/r/504555

Change 504555 merged by jenkins-bot:
[mediawiki/extensions/Score@wmf/1.34.0-wmf.1] Bundle data values for mw.config with the JS module that needs it

https://gerrit.wikimedia.org/r/504555

Mentioned in SAL (#wikimedia-operations) [2019-04-17T22:28:00Z] <krinkle@deploy1001> Synchronized php-1.34.0-wmf.1/extensions/Score/: Id58156cfca805 / T219342 (duration: 01m 03s)

Change 502772 restored by D3r1ck01:
CentralNoticeHooks: Bundle configuration vars into JS that needs it

https://gerrit.wikimedia.org/r/502772

(Also filed T221805: Reduce module registration overhead from CentralNotice as sub-task, which it seems Phabricator failed to report.)

Change 508427 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/FlaggedRevs@master] frontend: Only export wgStableRevisionId/wgFlaggedRevsParams when needed

https://gerrit.wikimedia.org/r/508427

Change 508427 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] frontend: Only export wgStableRevisionId/wgFlaggedRevsParams when needed

https://gerrit.wikimedia.org/r/508427

Krinkle added a comment.EditedMay 8 2019, 5:48 PM

In the startup module for all wikis / page views:

"wgCirrusSearchEnableSearchLogging": true,

Checked Wikimedia Gerrit and various third-party repos (Codesearch All), and checked on-wiki (mwgrep). Does not appear to be used anywhere.


Fixed.

Change 508874 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CirrusSearch@master] Remove 'wgCirrusSearchEnableSearchLogging' from startup JS export

https://gerrit.wikimedia.org/r/508874

Change 508874 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Remove 'wgCirrusSearchEnableSearchLogging' from startup JS export

https://gerrit.wikimedia.org/r/508874

Change 508889 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CirrusSearch@wmf/1.34.0-wmf.4] Remove 'wgCirrusSearchEnableSearchLogging' from startup JS export

https://gerrit.wikimedia.org/r/508889

Change 508895 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CentralAuth@master] Remove 'wgCentralAuthCheckLoggedInURL' from startup JS bundle

https://gerrit.wikimedia.org/r/508895

Change 508903 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/EventLogging@master] Remove 'wgEventLoggingBaseUri' from startup JS export

https://gerrit.wikimedia.org/r/508903

Change 508937 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/QuickSurveys@master] Remove redundant wgQuickSurveysRequireHttps from JS startup data

https://gerrit.wikimedia.org/r/508937

Change 508939 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/MultimediaViewer@master] Remove unused 'wgMediaViewerIsInBeta' from startup JS export

https://gerrit.wikimedia.org/r/508939

Change 508895 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Remove 'wgCentralAuthCheckLoggedInURL' from startup JS bundle

https://gerrit.wikimedia.org/r/508895

Change 508939 abandoned by Krinkle:
Remove unused 'wgMediaViewerIsInBeta' from startup JS export

Reason:
Superseded by rEMMV23b2f7864288: Remove the BetaFeatures integration (Hello Phab!)

https://gerrit.wikimedia.org/r/508939

Change 508889 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@wmf/1.34.0-wmf.4] Remove 'wgCirrusSearchEnableSearchLogging' from startup JS export

https://gerrit.wikimedia.org/r/508889

Mentioned in SAL (#wikimedia-operations) [2019-05-08T23:00:40Z] <krinkle@deploy1001> Synchronized php-1.34.0-wmf.4/extensions/CirrusSearch/includes/Hooks.php: T219342 / 164a7c135c800cf73f7fbfc (duration: 00m 59s)

Change 508937 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Remove redundant wgQuickSurveysRequireHttps from JS startup data

https://gerrit.wikimedia.org/r/508937

Change 502772 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] CentralNoticeHooks: Bundle configuration var into startup module

https://gerrit.wikimedia.org/r/502772

Only remaining item for myself to look into is RelatedArticles (T219342#5116773). The issues documented in comments here are all done, or handled by other teams via subtasks. Moving back to "Next" to come back to in a few weeks.

Change 508903 merged by jenkins-bot:
[mediawiki/extensions/EventLogging@master] Remove 'wgEventLoggingBaseUri' from startup JS export

https://gerrit.wikimedia.org/r/508903

Change 512430 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/CentralNotice@master] Remove 'wgCentralNoticeCategoriesUsingLegacy' from page view HTML

https://gerrit.wikimedia.org/r/512430

Change 512503 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/RelatedArticles@master] ext.relatedArticles.readMore.bootstrap: Convert to 'packagFiles'

https://gerrit.wikimedia.org/r/512503

Change 512504 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/RelatedArticles@master] Remove 'wgRelatedArticles*CirrusSearch' from page view HTML

https://gerrit.wikimedia.org/r/512504

Change 512529 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/RelatedArticles@master] Omit 'wgRelatedArticles' from page view HTML when empty

https://gerrit.wikimedia.org/r/512529

Change 512740 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] Remove deprecated 'jquery.byteLength' module

https://gerrit.wikimedia.org/r/512740

Change 512740 merged by jenkins-bot:
[mediawiki/core@master] Remove deprecated 'jquery.byteLength' module

https://gerrit.wikimedia.org/r/512740

Change 512503 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] ext.relatedArticles.readMore.bootstrap: Convert to 'packageFiles'

https://gerrit.wikimedia.org/r/512503

Change 512504 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Remove 'wgRelatedArticles*CirrusSearch' from page view HTML

https://gerrit.wikimedia.org/r/512504

Change 512529 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Omit 'wgRelatedArticles' from page view HTML when empty

https://gerrit.wikimedia.org/r/512529

Krinkle added a comment.EditedMay 28 2019, 8:26 PM

The last two chunks of work to be tracked as part of this goal are:

Change 517109 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] specials: Combine small miscellaneous 'mediawiki.special.*' modules

https://gerrit.wikimedia.org/r/517109

Change 512430 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Remove 'wgCentralNoticeCategoriesUsingLegacy' from page view HTML

https://gerrit.wikimedia.org/r/512430

Krinkle closed this task as Resolved.Tue, Jun 25, 5:23 PM

The last two chunks of work to be tracked as part of this goal are:

Fixed.

Fixed to the extent it was in scope for this goal. There is still more to be done in CentralNotice, which the team recommends FR-Tech schedules for a future quarter and we can provide support at that time as-needed.

Fixed.

Change 519312 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] resourceloader: Only output ResourceLoaderDynamicStyles when needed

https://gerrit.wikimedia.org/r/519312

Change 517109 merged by jenkins-bot:
[mediawiki/core@master] specials: Combine small miscellaneous 'mediawiki.special.*' modules

https://gerrit.wikimedia.org/r/517109

Change 519312 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Only output ResourceLoaderDynamicStyles when needed

https://gerrit.wikimedia.org/r/519312