[Qt-creator] SOLVED [was: Re: Qt Creator response too slow]

Matthias Ettrich matthias.ettrich at nokia.com
Fri May 8 15:53:27 CEST 2009


We are now caching those calls to isReadOnly in the base text document, which 
should make the performance issue go away.

We now get the permissions only when we load the file, or when we are trying 
to save it. Still annoying that basic operations can be that slow on Windows, 
definitely a Qt/Windows bug.

 Matthias

On Friday 08 May 2009 02:40:38 pm Ruotsalainen Juha (Nokia-S/Oulu) wrote:
> Hello to all Win32 API-freaks!
>
> File: C:\Qt\2009.02\qt\src\corelib\io\qfsfileengine_win.cpp
> Function: QFSFileEnginePrivate::getPermissions(void)
> Line 1700: "if(ptrGetEffectiveRightsFromAclW(pDacl, &trustee, &access_mask)
> ..."
>
> That Win32 API-call to GetEffectiveRightsFromAcl()triggers the Windows
> Domain Controller calls, and consequently 0.3 second delay per that call.
>
> Looking at the call stack we find:
> 00 QFSFileEnginePrivate::getPermissions(void)+0x268
> 01 QFSFileEngine::fileFlags(...)+0x9a
> 02 QFileInfoPrivate::hasAccess()+0x5e
> 03 QFileInfo::isWritable(void)+0x2d
> 04 TextEditor::BaseTextDocument::isReadOnly(void)+0x8e
>
> And this recurs time to time. TextEditor-plugin checks for read only, and
> that propagates to file engine, and eventually Win32 effective rights
> query.
>
> --
> jussi
>
>
> -----Original Message-----
> From: qt-creator-bounces at trolltech.com
> [mailto:qt-creator-bounces at trolltech.com] On Behalf Of Ettrich Matthias
> (Nokia-D-Qt/Berlin) Sent: 08 May, 2009 13:58
> To: qt-creator at trolltech.com
> Subject: Re: [Qt-creator] Qt Creator response too slow
>
>
> endEditBlock() will emit the cursorPositionChanged()-signals. The position
> of the main cursor is connected to
> BaseTextEditor::slotCursorPositionChanged(). There are also other signals
> emitted, meaning the problem could lie anywhere.
>
> Please continue profiling using a profiler, we still have no way to
> reproduce any of that :-{
>
> Matthias
>
> On Friday 08 May 2009 12:38:18 pm Ruotsalainen Juha (Nokia-S/Oulu) wrote:
> > For anyone interested:
> > I added a QTime::start() and elapsed() lines around
> > 'cursor.endEditBlock()' in basetexteditor.cpp's line 820 (snapshot
> > downloaded this morning). When I experience slow responses in Creator
> > (for my test runs) endEditBlock() at that line takes around 1.8 seconds
> > to complete.
> >
> > Without testing a bit, I would imagine all the sluggishness is due to
> > something lengthy happening in endEditBlock(). Quickly looking at the
> > endEditBlock() implementation, it is playing around with
> > QSharedDataPointer-stuff. That may cause network accesses somewhere in
> > the background.
> >
> > --
> > jussi
> >
> > -----Original Message-----
> > From: qt-creator-bounces at trolltech.com
> > [mailto:qt-creator-bounces at trolltech.com] On Behalf Of ext Boy Lenssen
> > Sent: 07 May, 2009 15:30
> > To: qt-creator at trolltech.com
> > Subject: Re: [Qt-creator] Qt Creator response too slow
> >
> > Sounds like you're on the good route! I believe the lasting time (about
> > 300 ms) is about what I'm experiencing (or maybe a bit more...not sure)
> >
> > -----Original Message-----
> > From: Juha.Ruotsalainen at nokia.com [mailto:Juha.Ruotsalainen at nokia.com]
> > Sent: donderdag 7 mei 2009 13:37
> > To: qt-creator at trolltech.com
> > Subject: Re: [Qt-creator] Qt Creator response too slow
> >
> > Valgrind, good as it is, is N/A for Vista.
> >
> > I did a quick trial runs with Sysinternals' Process Monitor. Test setup
> > was the same in both cases: same project, same code file, same point in
> > a method, hit enter at that line.
> >
> > The main difference between 1.0 and 1.1 is that the latter does ends up
> > spending 0.3 of a second at the nearest Windows Domain Controller
> > (\\xxwdc101\PIPE\samr) doing pipe operations: writing, reading and
> > calling
> > FileSystemControl (FSCTL_PIPE_TRANSCEIVE). These DC accesses occurred 14
> > times in my small log with each occurrence lasting for about 0.2-0.3
> > seconds.
> >
> > You doin' some funky pipe stuff in QtCreator now ;)
> >
> > --
> > jussi
> >
> >
> > -----Original Message-----
> > From: qt-creator-bounces at trolltech.com
> > [mailto:qt-creator-bounces at trolltech.com] On Behalf Of ext Aleksandar D.
> > Balalovski
> > Sent: 07 May, 2009 14:19
> > To: qt-creator at trolltech.com
> > Subject: Re: [Qt-creator] Qt Creator response too slow
> >
> > On Thu, May 7, 2009 at 1:15 PM,  <Juha.Ruotsalainen at nokia.com> wrote:
> > > Is there some option to enable humongous debug/event logs that would
> >
> > help in pinpointing where time is spent?
> >
> >
> > Maybe with valgrind?
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator





More information about the Qt-creator-old mailing list