Apache OpenOffice (AOO) Bugzilla – Issue 120575
[From Symphony] optimize a comparing operation from 'memcmp' to 'hash compare' to improve xls loading performance
Last modified: 2016-04-09 10:40:01 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