incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li zhang <lizh....@gmail.com>
Subject [call for review] optimize a comparing operation from 'memcmp' to 'hash compare' to improve xls loading performance.
Date Fri, 24 Aug 2012 06:06:10 GMT
hi, all
I have one fix need for review. Please check the below for details, thanks!

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

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(sample
file).

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message