In CVS:
After some indirect prompting from Erik, I wrote some link table update code which hopefully will speed up edits to pages with lots of links. Basic features:
* fairly well enabled/disabled with $wgUseBetterLinksUpdate * Article::showArticle() loads the link table with LinkCache::preFill(), then calls LinkCache::clear(), which clears the cache but leaves a copy of it hidden away. It then refills the cache with the new link table. * LinksUpdate::doUpdate() calls LinkCache::incrementalSetup(), which works out what needs to be added and deleted, and applies a simple formula to decide whether the old way or the new way should be quicker. * The new way deletes links row by row, and then adds the new ones using a single insert. Blanking large articles would be slow, hence that would be done the old way.
This has not been tested for speed yet. I think constructing a realistic test would be difficult -- it's probably easier just to put it on the live server and see what happens.
-- Tim Starling.