Description
MarkdownUI wraps UITextView backed by TextKit, which supports incremental text editing.
From what I understand, Textual is a pure SwiftUI implementation. StructuredText(markdown:) calls AttributedString(markdown:) synchronously on every update, which parses the entire string from scratch every time.
This is an issue for me because I'm streaming text in as it's available, so StructuredText() may happen 100s of times before I get a complete markdown doc. Markdown() did not have this issue. The result is a visual performance hit, where rendering slows down significantly.
I understand if the intention was to use a pure SwiftUI implementation, but because of this, I'm not able to use this package.
Checklist
Expected behavior
Incremental UI updates. No performance issues.
Actual behavior
Rerendering of UI, with visual UI slowdown.
Steps to reproduce
No response
Textual version information
0.3.1
Destination operating system
iOS 26
Xcode version information
Xcode 26.4
Swift Compiler version information
swift-driver version: 1.148.6 Apple Swift version 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102)
Target: arm64-apple-macosx26.0
Description
MarkdownUI wraps UITextView backed by TextKit, which supports incremental text editing.
From what I understand, Textual is a pure SwiftUI implementation.
StructuredText(markdown:)callsAttributedString(markdown:)synchronously on every update, which parses the entire string from scratch every time.This is an issue for me because I'm streaming text in as it's available, so
StructuredText()may happen 100s of times before I get a complete markdown doc.Markdown()did not have this issue. The result is a visual performance hit, where rendering slows down significantly.I understand if the intention was to use a pure SwiftUI implementation, but because of this, I'm not able to use this package.
Checklist
mainbranch of this package.Expected behavior
Incremental UI updates. No performance issues.
Actual behavior
Rerendering of UI, with visual UI slowdown.
Steps to reproduce
No response
Textual version information
0.3.1
Destination operating system
iOS 26
Xcode version information
Xcode 26.4
Swift Compiler version information