|Summary:||[PATCH] Fix to speed up opening xslx spreadsheets|
|Component:||XSSF||Assignee:||POI Developers List <dev>|
Patch for avoiding repeated calls to size function
Screenshot from profiler session showing bottleneck
Description Jan 2012-12-11 17:52:04 UTC
Created attachment 29744 [details] Patch for avoiding repeated calls to size function I'm seeing Apache POI being very slow when opening certain xslx/XSSF spreadsheets. After profiling, it turns out that around half the time was spent calling CTColsImpl.sizeOfColArray() inside ColumnHelper.addCleanColIntoCols(). See the attached screenshot from my profiler session. The fix is trivially simple, it just pulls the call to sizeOfColArray() outside of the loop. On some spreadsheets, this reduces the time of loading the spreadsheet to half of the original time.
Comment 1 Jan 2012-12-11 17:53:00 UTC
Created attachment 29745 [details] Screenshot from profiler session showing bottleneck