using ktexteditor as a base for a disassembly viewer

Sven Brauch mail at svenbrauch.de
Fri Dec 11 20:19:11 GMT 2020


Hi,

On 12/11/20 8:19 PM, Milian Wolff wrote:
> A better approach would store the layout (i.e.
> the text document) per item somehow. Maybe I can just put that into the model
> itself, next to the highlighting...

Yeah, but I profiled it back then and it seemed acceptable. I just tried 
again; dragging the scroll bar of an item view that looks like the 
attached gives the attached profile. You can see that compared to the 
time the plain QStyledItemDelegate::paint takes for the other columns, 
it's not orders of magnitude slower, especially considering that in this 
example the RichText delegate renders most of the contents anyways.

You are of course correct that computing the layout takes most of the 
time, but it seems to be like 50% of the time, not 99%, so I personally 
would solve this problem if it actually shows up. ;)

Greetings!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: itemview.png
Type: image/png
Size: 46989 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20201211/6a7bfd1a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile.png
Type: image/png
Size: 129634 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20201211/6a7bfd1a/attachment-0003.png>


More information about the KWrite-Devel mailing list