[KDev4] SimpleOutputView Renewal

Matt Rogers mattr at kde.org
Sat May 12 18:12:59 UTC 2007


On Saturday 12 May 2007 09:33, Alexander Dymo wrote:
> On 5/12/07, dukju ahn <dukjuahn at gmail.com> wrote:
> > Do we have any special reason why the current output widget
> > uses QStdModelItem instead of KTextEdit?
>
> Yeah, apart from what Matt said, there's one important issue with
> QTextEdit. It's really slow. See below for the numbers...
>
> > If we use QStdModelItem, the user can't copy the
> > outputs of commands.
>
> Yep, that's the problem. What we can do here is to allow the user to
> copy whole lines.
>
> > More severe problem is that listview gets slower when there are huge
> > numbers of output lines. Think about building entire KDE project or
> > entire firefox.
>
> Well, my tests showed that textedit is much much slower:
>
> QTextEdit: raw output (no rich text) + linewrapping:
> compiler output for files:
> 10 -> 168ms
> 100 -> 1659ms
> 1000 -> 16660ms
>
> QTextEdit: raw output without linewrapping:
> 10 -> 1602ms
> .....
>
> QListView (standard model and standard items):
> 10 -> 1ms
> 100 -> 5ms
> 1000 -> 34ms
>
> QListView (standard model and standard items and text elide mode):
> 10 -> 1ms
> 100 -> 7ms
> 1000 -> 53ms
>
> In those tests number "10" means not 10 lines of text, but rather the
> amount of compiler output for 10 files with make VERBOSE=1.
>
> Also it shall be noted that there's an additional delay between items
> are added to the listview and the moment they are displayed. That
> delay is hard to measure. The number I get just captures the moment
> listview returns control to the main thread.
>

Looks like the numbers here correlate to my personal thought that QTextEdit 
would be slower here than the list view. Thanks for this work Alex!
-- 
Matt




More information about the KDevelop-devel mailing list