larslockefeer / obsidian-plugin-todo

GNU General Public License v3.0
275 stars 48 forks source link

FR: Collect only from tagged files (TODOs from 4000 markdown files in (27.085s)`) #87

Open gerroon opened 11 months ago

gerroon commented 11 months ago

Hi

This plugin is great but not so great with large vaults

[obsidian-plugin-todo] Parsed 30 TODOs from 4000 markdown files in (27.085s)

It would be great if it can limit the search to tagged files like "#todo" etc. Maybe that can improve the load times.

larslockefeer commented 10 months ago

Hey @gerroon, thanks for reaching out. I'm sorry to hear that the plugin is slow for you.

I've been trying to investigate this a bit by generating data for a large vault (containing 4000 files of varying size with over 8000 TODOs, measuring ~180 MB in total) and using my plugin on that vault, but I don't really notice big performance issues:

In order to help me reproduce the problem locally, can you maybe share a little more information about:

This will help me find a local reproduction scenario to test performance improvements I might be able to add.

Thanks a lot!

gerroon commented 10 months ago

Are you on an SSD? My vault is on a regular 5400 RPM USB drive. I also use a lot of folders in my vault.

I use Windows 11, 64GB ram, Intel I9 desktop.

larslockefeer commented 10 months ago

Ah, that makes sense. I'm on an SSD indeed.

Is it just the initial load that is slow, or is Obsidian afterwards also performing sluggishly when the plug-in is running in your case?

gerroon commented 10 months ago

I think it is the initial parsing. Please see the first post, that is from the DevTools. The sluggishness happens around the time the log is printed.