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

optimize: improve toc performance #402

Merged
merged 3 commits into from
Dec 19, 2021
Merged

optimize: improve toc performance #402

merged 3 commits into from
Dec 19, 2021

Conversation

HEIGE-PCloud
Copy link
Owner

@HEIGE-PCloud HEIGE-PCloud commented Dec 19, 2021

By replacing getBoundingClientRect to offsetTop, the function execution time has been reduced significantly. The removal of legacy states is moved to the end so no forced reflow is created which improves the performance as well.

It cannot handle the last heading activation currently and needs more debugging.

Close #382

By replacing getBoundingClientRect to offsetTop, the function execution time has been reduced signifficantly. The removal of legacy states are moved to the end so no forced reflow is created which improves the performance as well.

There is an unsolved bug that it cannot handle the last heading activation and needs more debugging.
@HEIGE-PCloud HEIGE-PCloud added the performance The performance needs to be improved label Dec 19, 2021
@HEIGE-PCloud HEIGE-PCloud added this to the v0.2.14 milestone Dec 19, 2021
@HEIGE-PCloud HEIGE-PCloud self-assigned this Dec 19, 2021
@HEIGE-PCloud HEIGE-PCloud added this to In progress in Roadmap via automation Dec 19, 2021
@vercel
Copy link

vercel bot commented Dec 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pcloud/do-it/3EpFfnCTRZff2WxWL9b89ByaFecp
✅ Preview: https://do-it-git-optimize-toc-pcloud.vercel.app

@HEIGE-PCloud
Copy link
Owner Author

Have to say that the refactoring makes the development on theme.js a lot easier :)

@HEIGE-PCloud HEIGE-PCloud enabled auto-merge (squash) December 19, 2021 21:53
@HEIGE-PCloud HEIGE-PCloud merged commit 836325d into main Dec 19, 2021
Roadmap automation moved this from In progress to Done Dec 19, 2021
@HEIGE-PCloud HEIGE-PCloud deleted the optimize/toc branch December 19, 2021 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance The performance needs to be improved
Projects
No open projects
Roadmap
  
Done
Development

Successfully merging this pull request may close these issues.

[Performance] Improve scrolling performance
1 participant