Closed ParetoOptimalDev closed 1 year ago
Hmmm -- that's a lot of nodes. So I'm not really in a position to test it. But have you tried tweaking the information shown in the var consult-notes-org-roam-template
. I'm thinking in particular of counting backlinks. I wonder if that is causing at least some of the slowdown -- it seems to be 20% in the cpu and 18% in the mem profile.
@mclearc Yes, that helps a ton.
Not sure if it's enough for me to re-enable (though it might be...) given my sensitivty to latency, but for nearly everyone it will be I'm sure.
It's just about 1/2 second now... barely perceptible after:
(setq consult-notes-org-roam-template "${title:84} ${dir:12} ${sizes:6} ${fmtime} ${tags:10}")
If curious, here are the profiles after:
Oh it glancing at the profile it looks like removing sizes might just make it about equivalent... let's see.
Yes, removing blinks
and sizes
makes the performance have very nearly no perceptible performance difference with 3200 nodes :smile:
(setq consult-notes-org-roam-template "${title:84} ${dir:12} ${fmtime} ${tags:10}")
This also makes it fast enough I can add this source to consult buffer!
(add-to-list 'consult-buffer-sources 'consult-notes-org-roam--nodes)
I'm glad that works! I may update the readme with this info. I'm also going to be adding a new source allowing the scanning of org-agenda files in consult-notes. That might be of interest to you as well.
I tried out consult-notes for the first time today, and immediately noted the slowness too.
Hmmm -- that's a lot of nodes.
I don't think it is. If you're following a zettelkasten-like approach of using one note per idea (e.g. quotes, or jokes, or statistics, or code snippets), then 3200 isn't a surprisingly large number.
For comparison:
Luhmann's first paper-card zettelkasten had about 27K nodes, after about 11 years.
Luhmann's second zettelkasten had 67K nodes, after 23 years.
My Org-roam has approx 1500 nodes, after about a year and a half. That includes 500 org-roam-dailies. So I'm accumulating them at around half the rate that Luhmann did. I haven't kept very strictly to the one-idea-per-note approach though.
I note what's been said here about backlink-counts being a likely culprit of the slowness. If this is the case, could it be dropped from the default template?
Hi @fuzzbomb -- I've pushed a commit that changes the defaults. Please see https://github.com/mclear-tools/consult-notes/commit/4d92996f676cecfebea6519dadf8cf185621a18a.
This is for 3200~ nodes with vertico/orderless/corfu/marginalia.
I need to delete a lot of my nodes, but this prevents me from being able to use this package until I do that.
Not sure if there's some low-hanging fruit here.
cpu profile
``` 1446 80% - command-execute 830 46% - byte-code 830 46% - read-extended-command 830 46% - read-extended-command-1 830 46% - completing-read-default 830 46% - apply 830 46% - vertico--advice 801 44% - #mem profile
``` 117,013,987 77% - command-execute 73,207,689 48% - funcall-interactively 73,207,641 48% - execute-extended-command 73,207,513 48% - command-execute 73,207,465 48% - funcall-interactively 69,513,563 45% - org-roam-node-find 69,513,563 45% - org-roam-node-read 69,513,563 45% - apply 69,513,563 45% - consult-org-roam-node-read 69,513,563 45% - let* 69,298,300 45% - org-roam-node-read--completions 50,441,369 33% - #