https://bz.apache.org/bugzilla/show_bug.cgi?id=61862
--- Comment #2 from Greg Woolsey <gwool...@apache.org> --- How about caching the first and last keys and a "dirty" flag or clearing the cache values on structural changes? Then the first/last would only need to be calculated on first access after changes. I can see these being referenced many times when evaluating formulas, for example, but we wouldn't want them to be continuously updated as rows are being created. Lazy init, eager clearing/dirtying would perhaps still offer a formula performance gain without adding much if any overhead when creating documents. The only cases where it wouldn't add much value, and still wouldn't add much overhead beyond what TreeMap already does, would be cases where data changes and formula evaluations/data scanning are done repeatedly or in some iterative/interleaved pattern. In my experience these are not typical use cases. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org