Page MenuHomePhabricator

Runtime profiling shouldn't include time taken to parse wikitext
Closed, ResolvedPublic

Description

AF profiling system provides the time taken to execute all filters for a given edit. This includes the time taken to parse the wikitext, e.g. if new_html or new_pst variables are used. However, the parse operation performed by AF is shared with the edit itself, so its timing shouldn't be included in profiling: the final time it takes to save the edit is the same, it just anticipates the moment when the parsing happens.
I believe this is vital to do before moving on with T179604.
As for the implementation, instead of relying directly on microtime we could have some methods to start/pause/stop a "central" timer. This should be particularly easy to do with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/478232/72 in place.

Event Timeline

Change 498978 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Profiling: don't count time for operations shared with the edit

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

Daimona moved this task from Next to Under review on the User-Daimona board.

Change 498978 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Profiling: don't count time for operations shared with the edit

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