poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55280] Poor (Blocking) Performance of Merged Regions
Date Sun, 31 Aug 2014 20:26:05 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55280

Dominik Stadler <dominik.stadler@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Dominik Stadler <dominik.stadler@gmx.at> ---
Using dynaTrace to analyze where the time is actually spent here, I saw the
following top time consumers:

Method    Exec Sum    Breakdown    Class
count(Xobj, QName, QNameSet)    7.84s    CPU: 78 %, Sync: 0 %, Wait: 0 %,
Suspension: 0 %, I/O: 22 %    org.apache.xmlbeans.impl.store.Locale
remove_element(QName, int)    6.84s    CPU: 78 %, Sync: 0 %, Wait: 0 %,
Suspension: 0 %, I/O: 22 %    org.apache.xmlbeans.impl.store.Xobj
get_locale()    5.37s    CPU: 78 %, Sync: 0 %, Wait: 0 %, Suspension: 0 %, I/O:
22 %    org.apache.xmlbeans.impl.store.Xobj
find_element_user(QName, int)    3.95s    CPU: 78 %, Sync: 0 %, Wait: 0 %,
Suspension: 0 %, I/O: 22 %    org.apache.xmlbeans.impl.store.Xobj

So on top initially is not remove(), but actually count(), i.e. one of the
size-methods.

Drilling down into the details showed that the calls to count() are mainly done
because XSSFSheet.removeMergedRegion() calls sizeOfMergeCellArray() many times
but this call is quite costly in XMLBeans!

Removing the calls cut the time nearly in half from 29 to 15 seconds for 1500
merged regions.

I commited this small change as r1621631, this made the most time-consuming
method now actually remove_element() followed by getMergeCellArray().

By introducing a bulk-remove method XSSFSheet.removeMergedRegions(Set<Integer>)
as outlined below, the time needed to shift is reduced to around 800ms for the
shifting with 5000 merged regions, which I think should suffice for almost all 
use cases.

The second set of changes is committed as r1621633.

-- 
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


Mime
View raw message