qt-interest@trolltech.com
[Top] [All Lists]

Re: [qt4] QTextCursor

Subject: Re: [qt4] QTextCursor
From: "Duane Hebert"
Date: Mon, 24 Oct 2005 16:43:12 -0400
"Christopher Thompson" <chris@xxxxxxxxxxxxxxxxx> wrote in message
news:200510241338.00985.chris@xxxxxxxxxxxxxxxxxxxx

> > > For that matter, why not rewrite the inside of your for loop as:
> > >  table->cellAt(table->rows() - 1,
> > > i).firstCursorPosition().insertText(QGetArg(Buffer, i + 1, '|'));

> Well, if the slowness really does come from the free call inside of
> QTextCursor then not having to copy the cursor around MAY help, depending
on
> whether firstCursorPosition() returns by value or by reference and, if by
> value, if your C++ compiler is reasonable at optimisation.

Combining the calls as above reduces a single call to my function
from 32mS to 18mS.  Calling my function 250 times takes 30.2 S as is,
and 29.7 when combined.  This is in debug mode, with debug libs
but still...

--
To unsubscribe - send "unsubscribe" in the body to 
qt-interest-request@xxxxxxxxxxxxx
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>