'lightweight' QDir::isAbsolutePath replacement ?

Lubos Lunak l.lunak at suse.cz
Thu Mar 6 18:53:25 GMT 2008


On Thursday 06 of March 2008, Aaron J. Seigo wrote:
> On Thursday 06 March 2008, Ralf Habacker wrote:
> > The only static method Qt provides to handle this platform independent
> > is QDir::isAbsolutePath(). Unfortunally this method seems to be very
> > time expensive because it creates a temporary QDir instance.
>
> just to support this point, when doing some profiling and optimization for
> icon loading leading up to 4.0, this was at the very top of the profile in
> the KIconLoader! just changing that to a "by hand" check knocked off a huge
> chunk of the execution time (i forget the exact #s, i blogged about it
> though; by the end it was something like a 5x speed up over all, though,
> and this was a big part of that)
>
> so if we could have something light weight in kdelibs that would be great.

 As much as I grumble about and generally hate qt-bugs@, I disagree. If 
QDir::isAbsolutePath() path has a performance problem, fix it, send the patch 
to TT and put it to qt-copy/patches. That's one of the reasons it's there.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz




More information about the kde-core-devel mailing list