Return-Path: X-Original-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 89AB6DCA1 for ; Fri, 24 Aug 2012 05:59:57 +0000 (UTC) Received: (qmail 72163 invoked by uid 500); 24 Aug 2012 05:59:57 -0000 Delivered-To: apmail-incubator-ooo-issues-archive@incubator.apache.org Received: (qmail 72079 invoked by uid 500); 24 Aug 2012 05:59:56 -0000 Mailing-List: contact ooo-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-issues@incubator.apache.org Delivered-To: mailing list ooo-issues@incubator.apache.org Received: (qmail 72049 invoked by uid 99); 24 Aug 2012 05:59:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 05:59:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.123] (HELO sif.zones.apache.org) (140.211.11.123) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 05:59:54 +0000 Received: by sif.zones.apache.org (Postfix, from userid 80) id 7DBCF43CD; Fri, 24 Aug 2012 05:59:34 +0000 (UTC) From: bugzilla@apache.org To: ooo-issues@incubator.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 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: performance X-Bugzilla-Component: www X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lizh.fee@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ooo-issues@incubator.apache.org X-Bugzilla-Target-Milestone: not determined X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/ooo/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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.