Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed lagginess for notes with many icons #618

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

mdiller
Copy link
Contributor

@mdiller mdiller commented Nov 24, 2024

Added a small cache for font size that expires after 2 seconds. if many re-renders of inline icons happen at once (every icon in every internal link onscreen gets rerendered in the dom whenever you type), it won't spend a lot of time in this method any more.

I tried for a while to get at the root of the problem which is that it re-renders all the icons onscreen everytime you type anything, but wasn't able to get that to work well, so went with this simpler fix.

Fixes issue #602

See before/after examples:

BEFORE:

iconize_beforefix.mp4

AFTER:

iconize_afterfix.mp4

@Riffaells
Copy link

Yes great, it works

@FlorianWoelki
Copy link
Owner

Thank you for the PR!

@FlorianWoelki FlorianWoelki merged commit de88101 into FlorianWoelki:main Nov 30, 2024
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.

3 participants