Hey everyone! I'm playing around with KMPP + Compo...
# compose-desktop
m
Hey everyone! I'm playing around with KMPP + Compose (desktop + mobile) building a markdown editor and was looking at the Notepad example here and I'm wondering about this comment:
// TextField isn't efficient for big text files, we use it for simplicity
So what would be the most efficient component for large text files? 🤔 thank you color
a
So what would be the most efficient component for large text files?
A "virtualized" control, so a control that only draws the text that's visible. (Kinda like a RecyclerView) The basic text field control provided by ui frameworks always keeps all the text in memory and draws all the text when painting, even when it's not visible
m
Thanks @adte, I appreciate the response. Do you happen to have (or know of) an example of this being done. I think I get the concept, but not sure about best practices. gratitude thank you
a
there is a BasicTextfield2 being worked on, but I don't think it addresses this specific concern.
e
Feel free to add this as a feature request for future BasicTextField(/2) consideration/optimization. soft ping @Zach Klippenstein (he/him) [MOD] 🙈
z
BTF rewrite probably won’t get this sort of feature for it’s initial release at least, there’s too many other issues to address first
But supporting editing large things is on the roadmap
a
@Zach Klippenstein (he/him) [MOD] is BTF2 going to be available in compose 1.5.0 as experimental?
z
only in the last alpha, and the 1.6 alphas. It’s not in the 1.5 beta+