licht1stein / obsidian.el

Obsidian Notes for Emacs
GNU General Public License v3.0
376 stars 27 forks source link

Add skip-obsidian-dir-check-p check in `(obsidian-file-p)` for better performance in `(obsidian-update)` #91

Open Dima-369 opened 5 months ago

Dima-369 commented 5 months ago

I did my changes after discovering https://github.com/fstamour/obsidian.el/commit/7e8a5585966690636e8eb84cfe71fdbad10a126c

My changes impact performance positively already, but the commit above contains more changes.

Still, it would be great if this can be tested.

licht1stein commented 5 months ago

Can we use locate-dominating-file instead of obsidian-descendant-of-p?

Dima-369 commented 5 months ago

Possibly, but I wouldn't worry about that.

In (obsidian-reset-cache), it will always return true, regardless of locate-dominating-file or obsidian-descendant-of-p. It is the main culprit when the file size increases, so I made sure that it is not executed in the first place.