You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/05/23 10:51:06 UTC

[Bug 56556] New: XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

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

            Bug ID: 56556
           Summary: XSSFSheet.setColumnWidth performance issue caused by
                    ColumnHelper.getColumn1Based
           Product: POI
           Version: 3.11-dev
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: xiao.xj@bigfoot.com

It tooks 4-5 minutes for 3K columns.

public class Excel2007ColumnSize extends TestCase {

    int TOTAL_COL = 3000;
    short WDITH = 15 * 255;

    public void testSetColumnSize() {
        Workbook wb = new XSSFWorkbook();
        Sheet st = wb.createSheet();
        Row row = st.createRow(0);
        System.out.println("1: " + System.currentTimeMillis());
        for (int i = 0; i < TOTAL_COL; i++) {
            st.setColumnWidth(i, WDITH);
        }
        System.out.println("2: " + System.currentTimeMillis());
    }
}

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

--- Comment #2 from fengxx <xi...@bigfoot.com> ---
Created attachment 31656
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31656&action=edit
profiler run time

poi_runtime.xml

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

--- Comment #4 from fengxx <xi...@bigfoot.com> ---
Created attachment 31657
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31657&action=edit
call stack

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Nick Burch <ap...@gagravarr.org> ---
I've made a change in r1600319, which I think should help. Any chance you could
do a build from svn / get a nightly build after that, and see if it has made it
better?

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

--- Comment #3 from fengxx <xi...@bigfoot.com> ---
Comment on attachment 31656
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31656
profiler run time

I am not performance expert, I tried to use netbeans profiler and got the
report attached , most time is spend on 
org.apache.xmlbeans.impl.store.Locale.count(org.apache.xmlbeans.impl.store.Xobj,
javax.xml.namespace.QName, org.apache.xmlbeans.QNameSet)

org.apache.xmlbeans.impl.store.Xobj.find_element_user(javax.xml.namespace.QName,
int)

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

fengxx <xi...@bigfoot.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Any chance you could use a profiler to work out where the time goes within that
ColumnHelper method?

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


[Bug 56556] XSSFSheet.setColumnWidth performance issue caused by ColumnHelper.getColumn1Based

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56556

fengxx <xi...@bigfoot.com> changed:

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

--- Comment #6 from fengxx <xi...@bigfoot.com> ---
Thanks a lot, it is much better now,the time drops to 2 seconds from 4-5
minutes using the same test case.

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