Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony] optimize a comparing operation from 'memcmp' to 'hash compare' to improve xls loading performance | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | performance | Reporter: | lizh.fee | ||||||
Component: | code | Assignee: | AOO issues mailing list <issues> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | Normal | ||||||||
Priority: | P3 | CC: | leiw, liushenf | ||||||
Version: | AOO 3.4.0 | ||||||||
Target Milestone: | 4.0.0 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | ENHANCEMENT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
lizh.fee
2012-08-15 02:53:52 UTC
Created attachment 79115 [details]
patch for improving xls loading performance
Root cause: in xls loading procedure, ScPatternAttr::operator== occupies too much time, in this function, two sfxitemset are compared by memcmp(...), this is a time consuming operation. Resolution: Instead of memcmp(...), two sfxitemset can be compared 'quickly' by the hashkey only. And a function SfxItemSet::QuickCompare( SfxItemSet & rCmp) instead of EqualPatternSets(...). Test result: In ScPatternAttr::operator==, SfxItemSet::QuickCompare( SfxItemSet & rCmp) will be called 3141717 times, including 3114837 times only comparing hash key and directly return, memcmp(...). will be called 26880 times. Created attachment 79117 [details]
sample
following is test result for sample file (manual test), about 10% improvement. old: 4.31 4.38 4.37 4.44 4.31 4.34 4.41 4.40 4.47 4.50 avg:4.40 new: 3.90 3.93 3.78 3.75 3.75 3.85 3.84 3.87 4.00 4.00 avg:3.87 "leiw" committed SVN revision 1384677 into trunk: #i120575 optimize a comparing operation from 'memcmp' to 'hash compare' to im... Submit in revision 1384677, thanks for your patch fixed in 4.0.0 |