mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-04 20:58:13 +00:00
47f0194c2a
On the Wikimedia cluster, 1.6% of MediaWiki wall-clock time is burnt on calls from Lua into Scribunto_LuaSandboxCallback::frameExists()[1]. We can optimize away many of these calls by not calling into PHP to check if 'empty' or 'current' exist: the engine always reports that the 'empty' frame exists, and 'current' is guaranteed to have been set up (in LuaEngine::setupCurrentFrames) prior to calling into Lua. To help validate this, I added debug logging to the current production branch of Scribunto[2] to see if there are any cases where Scribunto_LuaSandboxCallback::frameExists('current') is false. As I write this commit message, the logging code has been active for 24H and there have not been any occurrences. [1]: https://performance.wikimedia.org/arclamp/svgs/daily/2021-03-16.excimer-wall.all.reversed.svgz [2]: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Scribunto/+/672836 Change-Id: I1902b711c9a442a5a42745a582a6a9ff988a355f |
||
---|---|---|
.. | ||
lualib | ||
HashLibrary.php | ||
HtmlLibrary.php | ||
LanguageLibrary.php | ||
LibraryBase.php | ||
LuaEngine.php | ||
LuaError.php | ||
LuaInterpreter.php | ||
LuaInterpreterBadVersionError.php | ||
LuaInterpreterNotFoundError.php | ||
LuaModule.php | ||
MessageLibrary.php | ||
SiteLibrary.php | ||
TextLibrary.php | ||
TitleLibrary.php | ||
UriLibrary.php | ||
UstringLibrary.php |