https://bugs.kde.org/show_bug.cgi?id=502233

Waqar Ahmed <waqar....@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |waqar....@gmail.com
     Ever confirmed|0                           |1
             Status|REPORTED                    |CONFIRMED

--- Comment #1 from Waqar Ahmed <waqar....@gmail.com> ---
The slowdown is in Qt. Its unable to handle a large number of format ranges
that are produced by KateRenderer::decorationsForLine when the ranges are
passed to QTextLayout::draw(). During text layouting this is not an issue.

One possible fix could be to render selection ourselves always:
- remove the following check in decorationsForLine so that we use the correct
foreground color during layouting. This will have implications for printing and
screenshot so that needs to be kept in mind:
            if (selectionsOnly) {
                assignSelectionBrushesFromAttribute(fr, *a);
            }
- Dont use Qt for selection background. Use our own function
paintTextBackground, that function needs a bit more testing, I think its still
a little bit broken with multiple wrapped lines

On quick testing, this removes all lag.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to