Skip to content

add caching#5971

Merged
willmcgugan merged 3 commits into
mainfrom
split-optimize
Jul 18, 2025
Merged

add caching#5971
willmcgugan merged 3 commits into
mainfrom
split-optimize

Conversation

@willmcgugan

@willmcgugan willmcgugan commented Jul 18, 2025

Copy link
Copy Markdown
Member

Optimize splitting content. This is a non-trivial operation when there are a lot of marked up spans. This update adds caching. If the render() method returns the same instance (as in the case of Static) then a previous split operation can be cached.

I noticed this with very large highlighted code. Selection would be slow because of the time spent in split.

There is still work to be done here, as text selection with large content is notiticably slow.

@willmcgugan willmcgugan merged commit 8e87fcc into main Jul 18, 2025
23 checks passed
@willmcgugan willmcgugan deleted the split-optimize branch July 18, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant