Thanks Lars and Mickael,
My thought was to change the "layouts" field to some kind of circular buffer or something that's more agnostic about the direction in which it grows -- or maybe even just a simple hashmap with a bit of decoration to prevent it from growing larger than CACHE_SIZE, and an eviction policy that calls dispose() when something gets replaced. One way or another I'd like to find a way to keep that cache full, which I assume would yield benefits beyond just this one bug (for example currently typing one letter into a 200-tall block selection takes abt 45 seconds on my machine, so I'd like to see what impact this has on that and then investigate that further assuming it's still slow after this fix).
Is it preferable to write my own cache utility as opposed to using 3rd party libs?
BTW I tried first sending this reply to the suggested eclipse-dev mailing list but I think that message has been awaiting moderator approval for several days now.
Thanks for any tips/suggestions/guidance.
Ari