Has anyone used the new SwiftUI 2.0 TextEditor with a sizeable string?
I'm currently trying it with a 400K text string and typing into the TextEditor horribly slow. Each letter I type takes seconds to appear.
When the text size is small (say just a few thousand characters) it's fast - so it's clearly something to do with performance. Is this a known issue? Should I be doing something to improve it?
PS - I do need to use it for my app (for e.g., a Markdown editor that loads a large file)
I'm currently trying it with a 400K text string and typing into the TextEditor horribly slow. Each letter I type takes seconds to appear.
When the text size is small (say just a few thousand characters) it's fast - so it's clearly something to do with performance. Is this a known issue? Should I be doing something to improve it?
PS - I do need to use it for my app (for e.g., a Markdown editor that loads a large file)
Code Block if let t = try? String(contentsOfFile: filePathName, encoding: .utf8) { editorText = t Config.logger.debug("EditorView.onAppear: Read text count = \(t.count) characters") }