You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/06/19 22:45:57 UTC

[Bug 59727] New: improving performance when adding a merged region or array formula

https://bz.apache.org/bugzilla/show_bug.cgi?id=59727

            Bug ID: 59727
           Summary: improving performance when adding a merged region or
                    array formula
           Product: POI
           Version: 3.15-dev
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: onealj@apache.org

There have been several performance-related bugs* opened for adding a merged
regions or array formula.
This may be slow because array formulas and merged regions cannot intersect, so
adding either requires checking all existing array formulas and merged regions.

XSSFSheet#validateArrayFormulas loops over each of the cells in a merged
region, gets the array formula region that the cell belongs to and determines
if it intersects.

If there are few array formulas in a sheet or if the merged region or array
formula is large, it may be faster to loop over the array formulas in the sheet
than looping over the cells where the intersection would occur. Right now we're
looping over cells and looping over the merged regions list, so there's
probably room for improvement here.

If the intersection code was slow relative to CellRangeAddress.hashCode+equals,
then it would be cheaper to add each checked address to a set--fortunately the
intersection code is about the same cost as equals, so this set approach would
actually be slower.

* related:
bug 55280: Poor (Blocking) Performance of Merged Regions
bug 59212: Do not check for overlapping regions when adding merged regions to a
sheet
bug 58885: Performance regression on addition of merged regions

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org