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 2010/06/13 14:32:05 UTC

DO NOT REPLY [Bug 49432] New: CommentsTable.getCTComment() has poor performance

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

           Summary: CommentsTable.getCTComment() has poor performance
           Product: POI
           Version: 3.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: alexkra@amdocs.com


CommentsTable.getCTComment() always goes over all comments. Run time is O(n^2).
In large Excel file when checking if cell has warning a total time that spent
in this method can take many minutes.
By keeping the table in Map<String, CTComment> where key is comment.getRef()
the run time imporved dramatically.
Also in XSSFSheet.read() method inside condition "if(p instanceof
CommentsTable)" there is no "break" which should stop unnecessary processing.

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


DO NOT REPLY [Bug 49432] CommentsTable.getCTComment() has poor performance

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

Nick Burch <ni...@alfresco.com> changed:

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

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2010-06-14 11:44:34 EDT ---
We can't simply keep a map, we also need to take steps to keep it in sync as
the comment references are updated, which means rippling up to the XSSFComment
level

I've implemented lazy caching in r954521, which should hopefully sort it for
you.

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