I am working on the replaceInternalLinks function, trying to improve speed. Tracking the "does this article exist" mechanism, I ended up at the preFill function in LinkCache.php, which reads all existing links for a page in a single query, avoiding zillions of queries later.
Now my question: Is there a reason why it doesn't pre-fill the "bad links" array as well? That would save some time on all pages with more than one broken link, would it not?
Magnus
On ĵaŭ, 2003-01-30 at 05:15, Magnus Manske wrote:
I am working on the replaceInternalLinks function, trying to improve speed. Tracking the "does this article exist" mechanism, I ended up at the preFill function in LinkCache.php, which reads all existing links for a page in a single query, avoiding zillions of queries later.
Now my question: Is there a reason why it doesn't pre-fill the "bad links" array as well? That would save some time on all pages with more than one broken link, would it not?
On the English wiki at least (where performance is critical), most links are live. It's fairly rare to have more than one or two broken links on a page, so a prefill on those might not save much.
On the other hand it shouldn't be much slower in the common case. If you want to add it, feel free.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org