https://bz.apache.org/bugzilla/show_bug.cgi?id=57840
--- Comment #23 from Greg Woolsey <[email protected]> --- (In reply to Javen O'Neal from comment #22) > Doing some Google searching, it looks like using new Integer(int) rather > than Integer.valueOf (the explicit version of implicit auto-boxing) may use > more memory due to duplicated objects wrapping primitives, but is faster > because it doesn't look up lookup cached values to save this memory. > > Did you notice any performance difference changing the boxing on the code > relating to this bug? Setting the Integer cache size, as noted above, helped significantly. Attached is a patch to XSSFSheet and XSSFRow, to explicitly create new Integer instances everywhere ints were autoboxed for calls to the TreeMap instances in those classes. This adds another 4% boost over just the cache setting, it turns out. Then there is the big winner so far, reducing my test time by > 30%: cache XSSFCEvaluationSheet refs so we can cache XSSFEvaluationCell refs in a HashMap, using a custom lightweight key object (int row/col fields, using good hash practice). HashMap lookups by direct row/column (which is what we have down in the function evaluators) is way, way faster than TreeMap lookups. For my sample, with 7,274 formula cells, most of which include one or more VLOOKUP calls to a Structured Reference with 3,726 rows, this was a huge improvement. -- 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]
