Page MenuHomePhabricator

Too many requests to load very simple main page
Closed, ResolvedPublic

Description

Hello, my wiki is very simple but it takes 59 requests to load the main page. I believe I did most of the optimizations. Main English Wikipedia is 37 requests, to compare. Any clues where to check?

Screen Shot 2020-05-04 at 8.01.30 PM.png (1×2 px, 744 KB)

Event Timeline

When you open the page in a browser and then check the Developer Tools' Network panel, I see many separate load.php requests. One for each module.

Looking at the value of mw.loader.maxQueryLength I see this is set to -1. Be sure to remove any setting related to that from LocalSettings.php. https://www.mediawiki.org/wiki/Manual:$wgResourceLoaderMaxQueryLength

Now just 12 requests! You guys are awesome!!

Sergiidumyk claimed this task.

Change 594296 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] resourceloader: Let wgResourceLoaderMaxQueryLength=-1 fallback to default

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

Aklapper removed Sergiidumyk as the assignee of this task.

Reopening as a patch by @Krinkle is pending.

So is there any more improvements I can get after the patch? Or is the patch just about enforcing what I had to fix?

So is there any more improvements I can get after the patch? Or is the patch just about enforcing what I had to fix?

It's trying to prevent this error happening for other people by treating -1 (which the MW installer was setting at some point) as 0, but infact, a sensible value

The patch won't make any further difference to your wiki

Change 594296 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Let wgResourceLoaderMaxQueryLength=-1 fallback to default

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

Gilles subscribed.

Is there anything left to do on this task, now that this patch has been merged?

Change 595992 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@REL1_34] resourceloader: Let wgResourceLoaderMaxQueryLength=-1 fallback to default

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

Change 595992 merged by jenkins-bot:
[mediawiki/core@REL1_34] resourceloader: Let wgResourceLoaderMaxQueryLength=-1 fallback to default

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