On Thursday, July 30, 2015 09:23:00 PM Mark Gaiser wrote: > On Tue, Jul 28, 2015 at 4:28 PM, David Faure <fa...@kde.org> wrote: > > On Tuesday 14 July 2015 19:28:58 Thomas Lübking wrote: > > > On Dienstag, 14. Juli 2015 19:00:14 CEST, Milian Wolff wrote: > > > > On Tuesday, July 14, 2015 11:49:25 AM David Faure wrote: > > > >> On Friday 26 June 2015 18:03:00 Frank Reininghaus wrote: ... > > > > > > > > It has. Querying the current time repeatedly is quite costly, > > > > and often shows > > > > up in code that extensively uses timers, or > > > > QDateTime::currentDateTime() etc. > > > > > > > > But it's probably still cheaper than querying on-disk meta data > > > > in the worst > > > > case, esp. on old rotary disks. > > > > > > Actually, checking currentTime() is already the problem here (causing > > > > the IO for the timezone stuff), see > > http://marc.info/?l=kde-core-devel&m3533622526705&w=1 (the 1st > > paragraph part of my comment somehow turned into a second-level quote) > > > > > Comparing a monotic timer (QElapsedTime) is however - at least on linux > > > > - close to cost free PLUS: one can have an entirely free "do not check > > again during this event cycle" flag. > > > > I used QElapsedTimer in https://codereview.qt-project.org/122247 > > and the resulting performance improvements are amazing. > > kbuildsycoca5 is twice faster. > > Ohh, interesting! You're optimizing stuff :D > > I just ran "kbuildsycoca5 --noincremental" through kcachegrind without your > patch to Qt and i do see one other quite big hot spot you might be > interested in. > In my case the profile collected 1.147.572.920 instructions. Nearly half of > all those instructions (516.700.823) are spend in QMimeType::inherits. The > cost per QMimeType::inherits call is 52.692 instructions (it's being called > 9806 times). That function is heavy! I don't know exactly what it's doing > since Qt is build in release mode without debug symbols (system package) so > i only see lots of cycles being spend there, not what they are doing. > > You can ignore this message if QMimeType::inherits internally calls the > method you optimized thus this function would be greatly improved already. > Internally it's calling this function: > http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/mimetypes/qmimedatabas > e.cpp#n216
It's improved by his patch, see https://codereview.qt-project.org/#/c/122247/ and the benchmark results therein. Bye -- Milian Wolff m...@milianw.de http://milianw.de
signature.asc
Description: This is a digitally signed message part.