Page MenuHomePhabricator

Optimizations in resource loader filestat checks?
Closed, InvalidPublic

Description

Author: mdale

Description:
Feel free to close this quickly if I miss read the code...

afaict after preloadModuleInfo we validate the cache for every logged in user? Does this mean we running filestat for every resource file every 5 min for every logged in user? If not already doing this, the RL could use global filestat times cache so its not validated for every logged in user so often?

  • Top level svn file reading. You could save a lot of filestat calls by just parsing revision from directory level svn files ( if available ).
  • The majority of mediaWiki installs they simply won't be modifying any of the release files, a global like $wgResourceLoaderCheckForFileChanges = false by default might not be a bad idea.

What does ResourceLoaderFileModule::getModifiedTime-filemtime profile time look like for sites without squid in-front of mediaWiki?

Maybe this is a non issue because of operating system level filestat cache? But might be painful for sites on network file systems.


Version: unspecified
Severity: enhancement

Details

Reference
bz26802

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:15 PM
bzimport set Reference to bz26802.

(In reply to comment #0)

Feel free to close this quickly if I miss read the code...

You are misunderstanding something, yes.

afaict after preloadModuleInfo we validate the cache for every logged in user?

No. Squid caches for *content* are bypassed for logged-in users. The Varnish caches for load.php are shared across all users, logged-in or not (except for the per-user things of course), so the startup module is regenerated once every 5 minutes, not per user per 5 minutes.