You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2014/01/21 09:36:05 UTC

[Bug 124065] [Performance] Low performance opening attached .ods

https://issues.apache.org/ooo/show_bug.cgi?id=124065

wujinlong@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wujinlong@gmail.com

--- Comment #1 from wujinlong@gmail.com ---
[ROOT CAUSE]
When there are too many Name Ranges in the ODF file, it takes a very long time
to import the document.

By using Purify, we found most of the time is used by function
ScRangeData::Clone(), which is called by function ScCollection::= while
constructing a new ScRangeName object.

Function:    ScRangeData::Clone
Calls:    1,511,522
Function time:    140,541.25 (3.08% of Focus)
F+D time:    845,851.27 (18.51% of Focus)

In my test, there is 1004 name ranges. In funtion
ScXMLImport::SetNamedRanges(), it will first add 1004 new Name Ranges, then it
will loop the 1004 entries to update the content and grammer. You can see that
1004 Name Ranges will lead to 1.5 Million (roughly 1004*1004) calls of
ScRangeData::Clone(), which is quite time consuming, thus resulting a slow
importing of the document.

Function:    ScXMLImport::SetNamedRanges
Calls:    1

Descendant
ScNamedRangesObj::addNewByName                    calls:1004
ScNamedRangeObj::SetContentWithGrammar    calls:1004

1) create new name ranges
Function:    ScNamedRangesObj::addNewByName
Calls:    1,004

Descendant
ScNamedRangesObj::ImplAddNewByScopeAndName    calls: 1004


2) update the name ranges
Function:    ScNamedRangeObj::SetContentWithGrammar
Calls:    1,004

Descendant
ScNamedRangeObj::Modify_Impl    calls: 1004

[RESOLUTION]
To improve the performance,  we will not create a copy of the ScNameRange
object, instead we will just use the existing ScNameRange to update.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.