incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120575] optimize a comparing operation from 'memcmp' to 'hash compare' to improve xls loading performance
Date Fri, 24 Aug 2012 05:59:33 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120575

--- Comment #2 from lizh.fee@gmail.com ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message