Calling #getItemNode on the un-initalised internalList caused
a tree rebuild of the sub-document.
On a page with 200 references this cuts the time it takes to
render the re-use list from ~2000ms to ~1000ms.
Bug: T134975
Change-Id: I696a965e88338e1bec2a14f61dab158c56728f2e
This code has been developed over three years now in the repo of MediaWiki's
integration of VisualEditor. It has grown and developed significantly during
that time, but now is pretty stable. A number of hacks inside the MediaWiki-
VisualEditor code base have been used to prevent this code from being loaded
on wikis where the Cite extension is not deployed, but this state of affairs
is and always was meant to be temporary.
This code is under the MIT licence which is a tad messy, but not impossible.
It's clearly labelled as such. The list of authors has been updated to take
into account the influx of new functionality.
Bug: T41621
Bug: T104928
Change-Id: I39936ed83d5a60471a0a75da753f498e80aef234