microsoft / microsoft/SwiftStreamingMarkdown
[Feature Request]: Make RenderableDocument codable
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 364
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
Why?
MarkdownView requires markdown parsing when using in a list (using as a single view is fine). Markdown parsing is called every time when the cell/row is reused and it's heavy. This is a perf issue.
Workaround
Current workaround to mitigate is to use a in-memory cache for RenderableDocument.
Suggestions
We can move a step forward and make RenderableDocument conform to Codable protocol. In that way, we can parse ahead and store it wherever we want (e.g. database).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate RenderableDocument and MarkdownView, then read how documents are created and consumed during list cell or row reuse. Add Codable support so a parsed RenderableDocument can be encoded and decoded for storage, and verify that the decoded document remains usable by MarkdownView without requiring parsing again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop-dev, mobile-dev, performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100