Closed thetarnav closed 2 weeks ago
Name | Link |
---|---|
Latest commit | 19c59a98611278b1cfe3f3210c038d751b510fe3 |
Latest deploy log | https://app.netlify.com/sites/shiki-next/deploys/666dd6731ef92d0008b490e2 |
Deploy Preview | https://deploy-preview-701--shiki-next.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 19c59a98611278b1cfe3f3210c038d751b510fe3 |
Latest deploy log | https://app.netlify.com/sites/shiki-matsu/deploys/666dd673148c0e0008b5f17f |
Deploy Preview | https://deploy-preview-701--shiki-matsu.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This improves the performance for using
codeToTokens
withincludeExplanation
option enabled.I'm working with a file that is 3k lines long, and getting the tokens with explanations was taking way too much time, around 7 to 9 seconds.
Turns out that the
explainThemeScope
function was redoing a decent amount of work for each token, for each scope, and for each setting, without depending on any of those. So it would be calculated once and reused.Now I get tokens for that file in ~1.5s
Probably could be improved more, but I didn't want to change any logic.