Bug 562086 - Use copy-on-write data structures to improve performance

Over the lifecycle of a document, many more document events are
processed than modifications happen to the registered position updaters.
Therefore it is beneficial to avoid a defensive copy on each read but
use a CopyOnWriteArrayList instead to allow iteration while concurrently
modifying the position updaters.

The change does also contain a little bit of cleanup when working with
the instance field fPositionUpdaters within AbstractDocument.

Change-Id: Id09b72ef70c872530aab6dd01c5e64abc4fbfb6c
Signed-off-by: Sebastian Zarnekow <sebastian.zarnekow@gmail.com>
1 file changed