poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45373] New: Huge performance problems
Date Thu, 10 Jul 2008 12:11:04 GMT

           Summary: Huge performance problems
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: jens.klinker@gmx.net

I´m using jxl, jx:if-tags, inside jx:for. This (jx:if) is calling very often
the following function and so I have huge performance problems!

Used poi-version:


        public void shiftRows(int startRow, int endRow, int n, boolean
copyRowHeight, boolean resetOriginalRowHeight) {

Ist improvement:

line-number 1199: problem is call of row2Replace.getLastCellNum() on each

for ( short col = row2Replace.getFirstCellNum(); col <=
row2Replace.getLastCellNum(); col++ )

why you don´t use following code instead? I save 30 % time!

short col=row.getFirstCellNum();
short lastCol=row.getLastCellNum();
while (true){
if(col > lastCol){

IInd improvement:

line-number 1228: I removed the following code because I never work with
comments, and most other people also. And I save again about 30 %. Perhaps you
should make this optional by using boolean parameter?

HSSFComment comment = getCellComment(rowNum, col);
if (comment != null) {
comment.setRow(rowNum + n);

With this 2 changes now I need 20 secs instead of 1 min!

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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