Bug 66607 - Slow method: XSSFSheet.isCellInArrayFormulaContext
Summary: Slow method: XSSFSheet.isCellInArrayFormulaContext
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 5.2.3-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL: https://github.com/apache/poi/pull/464
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-19 12:46 UTC by Henning Rohlfs
Modified: 2023-05-23 17:47 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Rohlfs 2023-05-19 12:46:59 UTC
I'm using the XSSF parser to read a rather large excel sheet with several thousand array formulas. This takes about 30 seconds with the current code, because cell.getRowIndex() is rather expensive and called inside a loop for each array formula.

Simply moving that call out of the loop reduces the time to about 3 seconds. The handling is still not optimal (looping through each formula for each cell still), but better already.
Comment 1 PJ Fanning 2023-05-19 13:09:54 UTC
Thanks - I've added r1909934. I will look at adding the rest of the PR changes later.
Comment 2 Henning Rohlfs 2023-05-19 13:42:00 UTC
The rest is not that important anyway. Those changes will already help a lot. Thanks!
Comment 3 PJ Fanning 2023-05-23 17:47:35 UTC
let's close this then