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

Christoph Cullmann <cullm...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/ktexteditor/-/commit
                   |                            |/e63590e005d8c7761e71f5b392
                   |                            |dd7bbc121131ef

--- Comment #4 from Christoph Cullmann <cullm...@kde.org> ---
Git commit e63590e005d8c7761e71f5b392dd7bbc121131ef by Christoph Cullmann, on
behalf of Waqar Ahmed.
Committed on 20/12/2023 at 14:40.
Pushed by cullmann into branch 'master'.

Optimize textInsert/setText

TLDR; accessibility stuff is super slow, try do it less.

When inserting text our document emits two signals, a public one and an
internal one. Accessibility listens to the internal signal i.e.,
textInsertedRange and then notifies any listening screen readers that
new text is available.

The way our code was working lead to about 3-4 textInsertedRange per
line which slowed things down to a crawl. I imagine it would also be a
horrible experience for a screen reader which doesn't need to know about
how the text editor is behaving internally.

With this change, all these signal emissions are removed and we emit
one fat signal that reports what text was inserted.

For me this brings down timings from 10 seconds to about 1.5 seconds.

M  +31   -13   src/document/katedocument.cpp
M  +3    -3    src/document/katedocument.h

https://invent.kde.org/frameworks/ktexteditor/-/commit/e63590e005d8c7761e71f5b392dd7bbc121131ef

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

Reply via email to