Page MenuHomePhabricator

WikiEditor + Liquidthreads: addModules is called once for each comment, increasing page load times drastically
Closed, ResolvedPublic

Description

Author: Nx.devnull

Description:
run addmodules only once

Liquidthreads calls EditPage::getEditToolbar a lot of times (once for each comment, if I'm not mistaken), each time WikiEditorHooks::addModules runs, and the result is a huge number of calls to wfMsgReal (over 20000 with a decent sized lqt talk page), and a drastic increase in page load times. The page will also contain all the messages multiple times, increasing its size. I've attached a patch to only run addModules once - I'm not sure this is the correct way to fix the problem, but addModules shouldn't be adding the same messages over and over again if it gets called multiple times.


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz26194

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:12 PM
bzimport set Reference to bz26194.

What is this patch against? The relevant code does not appear in trunk; in fact, this is already fixed in trunk thanks to ResourceLoader.

Nx.devnull wrote:

The UsabilityInitiative extension in 1.16wmf4.