https://issues.apache.org/bugzilla/show_bug.cgi?id=50786
Nick Burch <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #6 from Nick Burch <[email protected]> 2011-03-02 10:00:21 EST --- (In reply to comment #5) > HSSFColor.getIndexHash() method has comment: > "this function returns all colors in a hastable. Its not implemented as a > static member/staticly initialized because that would be dirty in a > server environment as it is intended. This means you'll eat the time > it takes to create it once per request but you will not hold onto it > if you have none of those requests." I think we should probably replace this with a lazy initialized static cache on HSSFColor. That way your first call may be a little slow while it's built, but all other calls on the server will then be fast. My plan would be to have it return an immutable hash which is statically cached, but also offer a 2nd method that will return a writable hash for anyone currently doing anything odd I could swap that round with the new method name for the static cache version, and the old method name for the mutable one, if someone can think of a good reason why to do it that way! -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
