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.
Created attachment 29745 [details] Screenshot from profiler session showing bottleneck
Thanks for this, committed in r1420501.