Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Load/Save performance: Improve StyleSheet mapping, reduce broadcasting on load | ||
---|---|---|---|
Product: | Calc | Reporter: | Armin Le Grand <Armin.Le.Grand> |
Component: | save-export | Assignee: | AOO issues mailing list <issues> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Normal | ||
Priority: | P3 | ||
Version: | 4.0.0-dev | ||
Target Milestone: | 4.0.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Armin Le Grand
2012-09-05 14:34:26 UTC
ALG: In XclExpXFBuffer the styles for export are held in a XclExpXFList (called maXFList). The method FindXF is used to checl if a style already exists. To do so, it iterates liinear over all existing styles. This is done often during export. To speed this up it would be better to hash this with the ItemSet as key and an index in the list as value. This can be on demand (extending as the list extends). Checking if/how this can be encapsulated. ALG: Extended all constructors of XclExpXF, member initialisations were missing. Added maXclExpXFMap as std::multimap for < const SfxItemSet*, XclExpXF* > to class XclExpXFBuffer (where maXFList resides, too). Adapted both FindXF to use the multimap for faster access. Both will on demand extend the multimap to newly added list entries. Works as expected, tested with *.xls files in the new trunk/test path. Load *.xls, save as *.xls (somewhere else), reload. The 272k example sc_complex_13sh_4kcell.xls went from 12 to 8 seconds savetime (average). ALG: Another bottleneck is ScStyleObj::SetOnePropertyValue because for every single property change a StyleSheetChange update is triggered. Since this update is independent from the property it can be optimized to do that after a range of properties is set. Added ScStyleObj::SetOnePropertyValueWithoutUpdate, made ScStyleObj::SetOnePropertyValue use it and call StyleSheetChangedUpdate() (also added and extracted from ScStyleObj::SetOnePropertyValue. Using in ScStyleObj::setPropertyValues to set all props in a loop and call update only once. ALG: Checked the code again and secured the XclExpXFList::ReplaceRecord calls; these need to reset the multimap buffer since the key value might change. ALG: Doing some more tests... ALG: Checked stuff from comment3 (load any *.ods from trunk/test). Works as expected. Changing title, it's enhancements for import (comment 1,2) and export (comment 3). "alg" committed SVN revision 1381548 into trunk: #120824# improve load/sve performance for spreadsheet ALG: Okay, comitted, done ALG: Okay, done. |