Lucas_Werkmeister_WMDE added a comment.
Apparently the metric is only tracked when the actual module is loaded, not
in startup. Also, I get the same weird timing locally:
MediaWiki.wikibase.view.fallbackchains.timing:313.77077102661|ms
MediaWiki.resourceloader_build.all:0.76603889465332|ms
MediaWiki.resourceloader_build.wikibase_fallbackchains:0.76603889465332|ms
And I think I’ve figured out why: it’s because the fallback chains are
already put together and hashed to determine the version, which happens
//much// earlier – if you go very far up the call stack:
name=ResourceLoader::respond()
// Combine versions to propagate cache invalidation
$versionHash = $this->getCombinedVersion( $context, array_keys(
$modules ) );
// See RFC 2616 § 3.11 Entity Tags
//
https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
$etag = 'W/"' . $versionHash . '"';
// Try the client-side cache first
if ( $this->tryRespondNotModified( $context, $etag ) ) {
return; // output handled (buffers cleared)
}
// Generate a response
$response = $this->makeModuleResponse( $context, $modules,
$missing );
`getCombinedVersion()` is where we already generate the fallback chains;
`makeModuleResponse()` is where RL eventually does the timing, by which point
we’ve already assembled all the data. (Our callback won’t even be called a
second time, RL caches it in `FileModule`’s `$this->expandedPackageFiles`.)
I wonder if there’s a cheaper version hash we can provide with the same
semantics (cleared on each deployment / php-fpm restart). Is there something
like a php-fpm version number or process ID?
TASK DETAIL
https://phabricator.wikimedia.org/T340832
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Michael, Lucas_Werkmeister_WMDE
Cc: noarave, guergana.tzatchkova, ItamarWMDE, Michael, Lucas_Werkmeister_WMDE,
Sarai-WMDE, Manuel, Aklapper, Bugreporter, Danny_Benjafield_WMDE,
Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, Akuckartz, Nandana, Lahi,
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS,
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]