You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
set a large text to the editor
for loop from 1 to 100
textController.text += 'anytext';
the memory will increase on each loop and it will not released.
Expected behavior
insert a new line without the need to read the text ( get/set ) with text+= because the text property is CPU and memory-heavy.
I expect a method like insertLine, insertText
Device:
OS: windows
Version 0.6.0
The text was updated successfully, but these errors were encountered:
@doonfrs I think it may be a cache issue. Since Flutter's paragraph is very expensive, the editor will cache the result and will not release it until the editor is destroyed.
@MegatronKing
Thank you for your reply,
Yes, I think we have two issues:
1 - Memory leak, the editor never releases the memory used in the text get method,
if I have 50 MB of text, and I call text 10 times, I will end up with 50X10 of data in the memory, my app reaches 32 GB.
2 - I found that replaceSelection is a good alternative.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
insert a new line without the need to read the text ( get/set ) with text+= because the text property is CPU and memory-heavy.
I expect a method like insertLine, insertText
Device:
The text was updated successfully, but these errors were encountered: