Page MenuHomePhabricator

Per-page cost of user settings blob increased significantly (broken default matching?)
Open, Needs TriagePublic

Description

  1. Reset user preferences on https://en.wikipedia.org/wiki/Special:Preferences
  2. View source of Main_Page (hard refresh).
  3. Enable or disable one of the gadgets and save preferences.
  4. View source of Main_Page again (hard refresh).

Expected

A small blob with basically just the one preference I changed, and maybe a small number of per-account overrides that are set by a hook to give some or all logged-in users a default-but-not-really-default setting.

Actual

After reset
mw.user.options.set({
  "enotifusertalkpages":0,
  "cx-entrypoint-fd-status":"shown",
  "echo-subscriptions-email-edit-user-talk":0
});
After reset and 1 minor change saved
mw.user.options.set({
"VectorSkinVersion": "1",
"advancedsearch-disable": 0,
"betafeatures-auto-enroll": 0,
"cx": 0,
"cx-entrypoint-fd-status": "shown",
"discussiontools-betaenable": 0,
"enotifusertalkpages": 0,
"flaggedrevswatch": 0,
"gadget-Blackskin": 0,
"gadget-BugStatusUpdate": 0,
"gadget-CollapsibleNav": 0,
"gadget-CommentsInLocalTime": 0,
"gadget-DebugMode": 0,
"gadget-DisambiguationLinks": 0,
"gadget-DotsSyntaxHighlighter": 0,
"gadget-ExternalSearch": 0,
"gadget-GoogleTrans": 0,
"gadget-HideCentralNotice": 0,
"gadget-HideFundraisingNotice": 0,
"gadget-HideInterwikiSearchResults": 0,
"gadget-HotCat": 0,
"gadget-ImageAnnotator": 0,
"gadget-JustifyParagraphs": 0,
"gadget-MenuTabsToggle": 0,
"gadget-MobileMaps": 0,
"gadget-Navigation_popups": 0,
"gadget-NewImageThumb": 0,
"gadget-NoAnimations": 0,
"gadget-NoSmallFonts": 0,
"gadget-OldDiff": 0,
"gadget-PageDescriptions": 0,
"gadget-PrettyLog": 0,
"gadget-PrintOptions": 0,
"gadget-Prosesize": 0,
"gadget-ProveIt": 0,
"gadget-ProveIt-classic": 0,
"gadget-RTRC": 0,
...
"growthexperiments-homepage-enable": 0,
"growthexperiments-homepage-pt-link": 0,
"language-local-exception": 0,
"popupsreferencepreviews": 0,
"rcshowwikidata": 0,
"revisionslider-disable": 0,
"skin-local-exception": 0,
"tmh-videojs": 0,
"twocolconflict": 0,
"echo-subscriptions-email-edit-user-talk": 0
});
Questions

Are these actually all different from the user.defaults blob served to unregistered users?

Which are redundant?

How come they get copied to every user account?

This might be related to recent rectoring to improve the way preferences are fetched and stored (T280220), /cc @tstarling @Pchelolo

Details

ProjectBranchLines +/-Subject
mediawiki/coremaster+23 -8
mediawiki/extensions/GlobalPreferencesmaster+3 -0
mediawiki/extensions/ContentTranslationmaster+1 -0
mediawiki/extensions/DiscussionToolsmaster+1 -0
mediawiki/extensions/Echomaster+12 -1
mediawiki/extensions/IPInfomaster+3 -2
mediawiki/extensions/TwoColConflictmaster+3 -1
mediawiki/coremaster+1 -2
mediawiki/extensions/BetaFeaturesmaster+17 -0
mediawiki/coremaster+5 -7
mediawiki/extensions/GrowthExperimentsmaster+3 -1
mediawiki/extensions/Gadgetsmaster+1 -3
mediawiki/extensions/Popupsmaster+4 -0
mediawiki/coremaster+33 -6
mediawiki/skins/Vectormaster+19 -0
mediawiki/extensions/Wikibasemaster+4 -0
mediawiki/coremaster+14 -3
mediawiki/extensions/RevisionSlidermaster+3 -0
mediawiki/extensions/AdvancedSearchmaster+3 -0
mediawiki/extensions/FlaggedRevsmaster+2 -1
mediawiki/extensions/TimedMediaHandlermaster+15 -0
Show related patches Customize query in gerrit

Event Timeline

It seems all of seem does not set a default in $wgDefaultUserOptions

Change 724516 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/skins/Vector@master] Use UserGetDefaultOptions hook to provide defaults

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

Change 724518 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/AdvancedSearch@master] Set DefaultUserOptions

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

Change 724519 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/BetaFeatures@master] Set DefaultUserOptions

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

Change 724521 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/FlaggedRevs@master] Add flaggedrevswatch to DefaultUserOptions

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

Change 724524 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/TimedMediaHandler@master] Use UserGetDefaultOptions hook to provide defaults

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

Change 724525 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/TwoColConflict@master] Add beta preference to DefaultUserOptions

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

Change 724529 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Echo@master] Add echo-cross-wiki-notifications to DefaultUserOptions

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

Change 724530 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/RevisionSlider@master] Add revisionslider-disable to DefaultUserOptions

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

Change 724532 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Wikibase@master] Use UserGetDefaultOptions hook to provide defaults

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

Change 724534 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Gadgets@master] Add all gadgets to DefaultUserOptions

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

Change 724540 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Add all api preferences to DefaultUserOptions

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

Change 724542 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Fix UserOptionsManager::EXCLUDE_DEFAULTS exclusion check

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

Change 724524 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Use UserGetDefaultOptions hook to provide defaults

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

Change 724518 merged by jenkins-bot:

[mediawiki/extensions/AdvancedSearch@master] Set DefaultUserOptions

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

Change 724521 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Add flaggedrevswatch to DefaultUserOptions

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

Change 724530 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Add revisionslider-disable to DefaultUserOptions

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

Change 724566 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Set variant in UserOptionsManager::loadOriginalOptions only for variants

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

Change 724697 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/DiscussionTools@master] Add beta preference discussiontools-betaenable to DefaultUserOptions

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

Change 724699 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Popups@master] Add preference popups-reference-previews to DefaultUserOptions

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

Change 724700 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/ContentTranslation@master] Add beta preference cx to DefaultUserOptions

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

Change 724702 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/GrowthExperiments@master] Add preference homepage-enable/homepage-pt-link to DefaultUserOptions

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

Change 724703 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Set default for all namespaces on user preference searchNs*

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

Change 724532 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Set DefaultUserOptions for rcshowwikidata and wlshowwikibase option

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

Change 724516 abandoned by Umherirrender:

[mediawiki/skins/Vector@master] Use UserGetDefaultOptions hook to provide defaults

Reason:

No optimization (as wanted in the task) possible after preference reset due to many different usage of preferences for difference state of users.

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

Change 724697 abandoned by Umherirrender:

[mediawiki/extensions/DiscussionTools@master] Add beta preference discussiontools-betaenable to DefaultUserOptions

Reason:

No optimization (as wanted in the task) possible after preference reset due to many different usage of preferences for difference state of users.

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

Change 724542 merged by jenkins-bot:

[mediawiki/core@master] Remove more defaults for flag UserOptionsManager::EXCLUDE_DEFAULTS

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

Change 724699 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Add preference popups-reference-previews to DefaultUserOptions

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

Change 724700 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add beta preference cx to DefaultUserOptions

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

Change 724534 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Add all gadgets to DefaultUserOptions

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

Change 724702 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add preference homepage-enable/homepage-pt-link to DefaultUserOptions

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

Change 724566 merged by jenkins-bot:

[mediawiki/core@master] user: Add default value for all \"variant\" user option keys

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

Change 724519 merged by jenkins-bot:

[mediawiki/extensions/BetaFeatures@master] Set DefaultUserOptions

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

Change 736036 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Exclude null values for flag UserOptionsManager::EXCLUDE_DEFAULTS

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

Change 724525 abandoned by Umherirrender:

[mediawiki/extensions/TwoColConflict@master] Add beta preference twocolconflict to DefaultUserOptions

Reason:

Lets keep the code as is

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

Change 736036 merged by jenkins-bot:

[mediawiki/core@master] Exclude null values for flag UserOptionsManager::EXCLUDE_DEFAULTS

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

Change 724529 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Add echo-cross-wiki-notifications to DefaultUserOptions

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

Change 737156 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/IPInfo@master] Set DefaultUserOptions for all preferences

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

Change 737156 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Set DefaultUserOptions for all preferences

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

Change 724697 restored by DLynch:

[mediawiki/extensions/DiscussionTools@master] Add beta preference discussiontools-betaenable to DefaultUserOptions

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

Change 724697 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add beta preference discussiontools-betaenable to DefaultUserOptions

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

Func added a subscriber: Func.

I think the GlobalPreferences extension is affected most by the change for T280220 since it creates local exceptions for every registered preference.

Change 753958 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/GlobalPreferences@master] Filter out false local exceptions from save to database

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