Text Editing Performance issues
Hello!
I've been trying out Flex 4 and TLF recently, and I've stumbled on huge performance issue in TextArea component, which is built around TLF.
It works great for smaller texts, but when you try to edit text say 50kB long, then you find yourself struggling at every character, cause they appear with a noticeable delay as you type.
I've tried to take a deeper look into a problem, and it seems that TLF recomposes all the text up to the insertion point on each character insert. It's really visible - typing is OK at the begining of the text, but it becomes really slow at the end of it.
I believe that recomposition on every single text insert operation is done in EditManager.finalizeDo which calls
updateAllControllers() every time.
Is it a TLF problem or Flex problem? If it's flex problem, then what was done wrong in Flex 4 TextArea? How can it be optimized so that performance becomes acceptable?
