Performance/UI work on text view and message model; open URLs with Application…

Authored by hein on Aug 30 2017, 12:55 AM.

Description

Performance/UI work on text view and message model; open URLs with Application::openUrl

Text view:

  • Cut down on number of objects in delegate (two objects in the best case). This is absolutely key to ListView scroll performance as it makes them faster to instanciate.
  • Simplify bindings, helps with post-instanciation initial computation.
  • Mark some props as readonly, lets the runtime optimize better.
  • Switch to the Text.StyledText textFormat - stricter, faster, smaller HTML parser and likely avoiding internal QTextDocument, greatly speeds up setting content on a delegate instance.

Combined with 4bea6ed6c4e this actually performs really quite well on
irc://irc.wikimedia.org/en.wikipedia, including scrolling, and also
makes view switching feel instantaneous. Happiness.

Also:

  • Temporarily removes text selection again. (Needs rework anyway, but we have a plan now!)
  • Open links using Application::openUrl instead of Qt method to respect our settings.
  • Better word wrapping for line and wrap before scrollbar.

Message model:

  • Limit size, cull internal data structures in batches when it grows beyond limit, so Konvi won't fill all your RAM now when it leaves running, but we also don't do cull work on every new message.
  • Reserve space in batches to speed up per-line insertion a little bit.

Details

Committed
heinAug 30 2017, 6:00 AM
Parents
R7:4bea6ed6c4e6: Move the support code for message grouping into C++.
Branches
Unknown
Tags
Unknown