https://issues.apache.org/bugzilla/show_bug.cgi?id=55612

            Bug ID: 55612
           Summary: Performance improvement (~11% up to ~92%) by adding a
                    cache to HSSFCellStyle.getDataFormatString()
           Product: POI
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HSSF
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 30895
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30895&action=edit
HSSFCellStyle patch

Similarly to BUG-55611 we found an easy way to improve POI's performance. 
The idea is to avoid re-executing HSSFCellStyle.getDataFormatString() if the
various parameters/object-state are not changing.
This can be done by adding a single-static-entry cache and check if the
parameters/object-state did change from the previous call, and in case
invalidate the static cache. While the code in the patch might not be the most
elegant my main purpose is to expose this performance problem I have found with
an easy fix as solution.
For example, when running Poi 3.9 on a small document (~40 KB) and on a larger
document (~13.5 MB), the patch reduces the running time
giving a speedup of ~11% in the first case and ~92% in the second case.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to