How to optimize performance for repeated rendering on live chat messages? #261
Unanswered
bradleybernard
asked this question in
Q&A
Replies: 1 comment
-
Hi @bradleybernard did you find a solution for this ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using this library to render Markdown for my new iOS app that is an AI assistant. The bot messages that come in, come in as a
String
that includes markdown text.Each new chunk of the response triggers a SwiftUI view body update and therefore triggers the whole Markdown parsing + rendering process.
Is there any way to optimize for markdown content parsing & rendering, knowing I'm going to be building a tree over time?
String
contents
come inMarkdown(contents)
Markdown
SwiftUI view parses and rendersMarkdownContent
Could I resume parsing where I left off? Sharing parsing artifacts/memory between subsequent parsing calls? Same with rendering? Caching previous results with some logic there. Curious what other folks are doing.
Beta Was this translation helpful? Give feedback.
All reactions