Speeding up SeparatorList - proposed patch

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Speeding up SeparatorList - proposed patch

As stated in the SeparatorList class documentation, the current implementation is "slow at the moment and won't scale to lists of size larger than a hundred or so efficiently".

By using another strategy in the updateGroup() method, we've managed to avoid the linear scan. Adding 100 000 entries to a  SeparatorList was reduced from ~65 seconds to 4 seconds on a 3.6 GHz single core Xeon.

I was not sure of whether to create an Issue or not for this feature so I just supply the patch here.

- pergl-SeparatorList-perf-patch.dif