obsidian-remember-cursor-position icon indicating copy to clipboard operation
obsidian-remember-cursor-position copied to clipboard

Unusually High StartUp Time

Open chrisgrieser opened this issue 3 years ago • 4 comments

Using the "Debug StartUp Time" toggle, I noticed that every time I startup Obsidian, remember Cursor Position takes up the highest amount of ms for starting up out of all plugins I have installed (~50 plugins).

Remember Cursor Position takes up ~150ms; in comparison: dataview, one of the most resource intensive plugins, only requires 50ms on my machine.

I investigated a bit and it seems reading the remembered cursor positions is the culprit, deleting the respective json reduced to startup time of the plugin to nearly 0ms again.

chrisgrieser avatar Aug 25 '22 11:08 chrisgrieser

Thanks for the research. Any ideas how this can be optimized?

dy-sh avatar Aug 25 '22 11:08 dy-sh

Hmm. Maybe add a setting like "max age before deletion" for the remembered positions? My guess is that the amount of cursor positions accumulated for over a year just become too big.

chrisgrieser avatar Aug 25 '22 11:08 chrisgrieser

You're right, that would be better.

dy-sh avatar Aug 25 '22 15:08 dy-sh

another filter could be: only remember cursor position for files longer than N lines

then for lots of small files where you don't have to scroll anyway, no need to save/restore

digitalsignalperson avatar Mar 09 '23 19:03 digitalsignalperson