poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59432] New: createName is slow when there are many Names (10000)
Date Fri, 06 May 2016 03:29:43 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59432

            Bug ID: 59432
           Summary: createName is slow when there are many Names (10000)
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: cgh_chen@126.com

XSSFName

public void setNameName(String name)
  {
    validateName(name);

    int sheetIndex = getSheetIndex();

    for (int i = 0; i < this._workbook.getNumberOfNames(); i++) {
      XSSFName nm = this._workbook.getNameAt(i);
      if ((nm != this) && 
        (name.equalsIgnoreCase(nm.getNameName())) && (sheetIndex ==
nm.getSheetIndex())) {
        String msg = new StringBuilder().append("The ").append(sheetIndex == -1
? "workbook" : "sheet").append(" already contains this name:
").append(name).toString();
        throw new IllegalArgumentException(msg);
      }
    }

    this._ctName.setName(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


Mime
View raw message