akvelon / flutter-code-editor

Flutter Code Editor is a multi-platform code editor supporting syntax highlighting, code blocks folding, autocompletion, read-only code blocks, hiding specific code blocks, themes, and more.
https://akvelon.com
Apache License 2.0
197 stars 47 forks source link

Performance issue for long text #264

Open Srimathi622 opened 9 months ago

Srimathi622 commented 9 months ago

Hi, I am developing a Flutter desktop application. The typing speed is reduced if we go for huge text. is there any way to add lazy loading or something else?

TheMultii commented 9 months ago

You would have to mostly rewrite the entire text editor in flutter to get a working lazy loading. It's also possible to split the TextField into many TextFields, but this is also difficult to implement, and has no advantages other than performance.

https://github.com/akvelon/flutter-code-editor/issues/73 https://github.com/flutter/flutter/issues/128575

Srimathi622 commented 9 months ago

Thanks for your reply. Now My app is hanged when we have huge text. There is some delay while typing. is there any way to overcome these issues?

TheMultii commented 9 months ago

The repository is under Apache 2.0 licence, so you could fork it and try to implement an idea with many TextFields. But then you would have to do some kind of content management (split) between them, which is probably hard to implement.

There's not much you can do if Flutter's TextField is laggy when handling too many lines of text.

The problem I mentioned is that it's only laggy on the web, not on different platforms. As far as I am concerned, it has performance issues on every single platform.

I guess we will have to wait until the issues are resolved.

Srimathi622 commented 9 months ago

Thanks for your reply, Marcel. I didn't get your idea (implement an idea with many TextFields). Could u pls explain this?

Srimathi622 commented 9 months ago

I read this issue. [https://github.com/flutter/flutter/issues/90063]. will it solve the performance issue if we implement the TextField with DeltaTextInputClient? What is your point of view about this Github discussion?