Page MenuHomePhabricator

Data pages do not load or perform poorly when there are a large number of uses tracked
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Go to a data page that contains a large number of usage tracking links (e.g. https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab)

What happens?:
The page takes a long time to load, or fails to load at all

What should have happened instead?:
The page should load and the usage links should be paginated (same as Global Usage, 500 links at a time, then linking to a special page specifically for links)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Wikis that have Extension:Chart enabled

Other information (browser name/version, screenshots, etc.):
All

Thank you @Tacsipacsi for reporting this in T371300.

Details

Event Timeline

CCiufo-WMF updated the task description. (Show Details)
CCiufo-WMF updated the task description. (Show Details)
CCiufo-WMF set the point value for this task to 3.

Yep, I see what needs to be done -- I can crib related code off GlobalUsage for setting up a pager on this.

Change #1130727 had a related patch set uploaded (by Bvibber; author: Bvibber):

[mediawiki/extensions/JsonConfig@master] WIP pager to break up large globaljsonlinks backlinks

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

We're close to being in business. ;)

Here's the Special:GlobalJsonLinks view on my local test wiki; it pages correctly if you bump the results down. It should handle large datasets more efficiently than the current query that dumps everything into one giant list:

image.png (2,848×2,334 px, 890 KB)

Next step this afternoon is to finish porting the Data: page usage list to use the new functions as GlobalUsage does for images, with it cutting off after 500 items or whatever and linking to the pager for the rest.

Patch should be fully functional at this point, but my last update yesterday didn't pass a test due to a whoopsie in an edge case. :D Should be corrected now. We won't make the cutoff for deployment today, so expect to deploy this next week after code review. (I'll be at an offsite meeting but with my dev laptop so I can schedule a deployment myself in a pinch.)

Change #1137571 had a related patch set uploaded (by Aude; author: Bvibber):

[mediawiki/extensions/JsonConfig@master] Pager to break up large globaljsonlinks backlinks

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

Jdlrobson-WMF subscribed.

I will review https://gerrit.wikimedia.org/r/1137571 and setup a new task for the follow up to make the special page work in Codex.

Jdlrobson-WMF renamed this task from Data pages perform poorly when there are a large number of uses tracked to Data pages do not load or perform poorly when there are a large number of uses tracked.Apr 24 2025, 5:37 AM

Change #1130727 merged by jenkins-bot:

[mediawiki/extensions/JsonConfig@master] Pager to break up large globaljsonlinks backlinks

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

Ok, initial refactor with limit to 50 results is merged! Thanks all! The Special: page for browsing is rolled forward into T392535 and jon has some ideas on refactoring the multi-site-link-pager itself into core so we can a) restyle it with modern codex and b) use the same front-end pager code for GlobalUsage and anything else that might be doing similar linking in future.