obsidian-spaced-repetition
obsidian-spaced-repetition copied to clipboard
Startup time
Obsidian has a feature you can turn on in community plugin list to measure the startup time of plugins. I see this plugin is the slowest I have. On my iPad 2018 it takes about a second and half to load.
Of course, this isn’t a big deal. But perhaps some startup optimization can be done. Especially since a user may not even use the plugin right away.
The problem is if you get a few plugins that aren’t startup optimized, it slows the start of obsidian.
I looked at this briefly, and it seems the stats-modal is accounting for ~17ms of what I profiled as a 28ms load on a MacBook M1. I suspect those numbers are larger on older machines. I'm guessing this is due to having to load the chart.js lib
I could open a PR to dynamically import the chart libs so that Obsidian doesn't have to load them at start https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-4.html
Thoughts @st3v3nmw?
With stats modal

Without stats modal

I could open a PR to dynamically import the chart libs so that Obsidian doesn't have to load them at start https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-4.html
Thoughts @st3v3nmw?
Hi @olingern, that would be a nice fix.
P.S. Sorry for the delayed response