[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: kword rendering speed: QTextFormatCollection
From:       Jos van den Oever <Jos.van.den.Oever () kogmbh ! com>
Date:       2009-09-26 9:36:11
Message-ID: 200909261136.11072.Jos.van.den.Oever () kogmbh ! com
[Download RAW message or body]

On Saturday 26 September 2009 10:33:14 am Thomas Zander wrote:
> On Saturday 26. September 2009 01.52.06 Jos van den Oever wrote:
> > I looked into KWord loading speed today and found an interesting
> > bottleneck. While loading the ODF 1.2 draft [1], 23% of CPU time was
> > spent in QTextFormatCollection::indexForFormat, which itself called
> > QTextFormat::operator==(QTextFormat const&) a lot.
> >
> > The reason for this is inefficient looking up of QTextFormat indexes in
> > QTextFormatCollection. I have attached a patch for Qt that fixes the
> > problem.
> 
> Did you make a merge request on qt.gitorious.org ?
No for three reasons:
 1 ) i do know how to. should i make a clone on gitorious.org?
 2) Qt people should probably mold the patch a bit to make it Qt-er
 2) i'm looking to improve a bit more. I took a look at what's actually being 
hashed

     75   QVariant::QTextLength
     79   QVariant::void*
    716   QVariant::QColor
   8485   QVariant::QVariantList
 159576   QVariant::QPen
 191113   QVariant::bool
 211462   QVariant::QBrush
 324047   QVariant::int
 476443   QVariant::double
 571039   QVariant::QString

I'm adding special but simple and fast hash calls for QBrush, QPen and 
QTextLength now.

Cheers,
Jos


-- 
Jos van den Oever, software architect
+49 391 25 19 15 53
http://kogmbh.com/legal/
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic