poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58525] New: Optimization of adding/modifying named cells
Date Fri, 23 Oct 2015 09:37:53 GMT

            Bug ID: 58525
           Summary: Optimization of adding/modifying named cells
           Product: POI
           Version: 3.13-dev
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: richard.hart@nl.pwc.com

Created attachment 33196
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33196&action=edit
patch file created with Git.

If a large number of named cells are used, a great deal of time is spent
determining if the name is already used in a given sheet due to looking up the
name by looping through an array of names.

This optimization adds a Map<Integer sheetNumber, Map<String name, NameRecord>>
wherever the array of names exists. The NameRecord may be an HSSFName depending
on which model is being used.

The duplicate test in HSSFName.setNameName() uses the map to find a duplicate
if one exists rather than looping through the names array.

As far as I know this does not break any existing functionality. All unit tests
executed in the ant build are successful although none of the unit tests have
been modified to use the new getName(name, sheetNumber) method. 

This change was prompted by a project that builds a large excel workbook of 58
sheets with about 3000 named cells per sheet. The time required to produce the
workbook was 4:47 before the modification and 3:14 after, about a 30%

The change is based on poi-3.13. To my knowledge this is a release version.

My local project is named poi-3.13-pwc. The included patch references that
project name.

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

View raw message