Last modified: 2013-03-28 02:59:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43377, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41377 - Linker::link is inefficient
Linker::link is inefficient
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://translatewiki.net/w/profileinf...
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 09:40 UTC by Niklas Laxström
Modified: 2013-03-28 02:59 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2012-10-25 09:40:12 UTC
In https://gerrit.wikimedia.org/r/#/c/29879/ I was able to save tens of megabytes of memory by using Html::element( 'a' ) instead of Linker::link.

Profiling also confirms my observations: over 20k per call and 0.5 ms per call. Not much per se, but it really adds up when making hundreds or even thousands of links like I do.

Part of this might come from hooks: Translate and SemanticForms are using hooks in linker.
Comment 2 Daniel Friesen 2012-10-25 09:47:19 UTC
We should probably put real profiling around those hook calls. Or do we do that implicitly?
Comment 3 Niklas Laxström 2012-10-25 13:54:45 UTC
All hook calls are profiled, you just need to know the name of the hooked-up functions to search for them.
Comment 4 Daniel Friesen 2012-10-25 13:58:36 UTC
Sounds unreliable. We should also profile whole combined calls for separation from the surrounding function.

We've got another bit of profiling there for the known stuff that does db calls. How long does that take?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links