Skip to content
Commit e63590e0 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

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.

BUG: 478250
parent c151a910
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment