Open borgauf opened 5 months ago
I don't know, I haven't stressed tested it.
AFAICT, org-brain really doesn't "read in" all of a brain's entries and establish some in-memory cache for that whole brain, correct? It is only your visualize functionality that actually crawls JIT and creates the visualize view in the buffer, right? Also, there's no real way with org-brain to do a query or filter -- other than some terminal-level grep, or an org-mode tags filter, correct?
The entries are cached and stored in memory after the first "scan" of a session. I think there are ways to store the cache to disk.
There's no queries provided by org-brain no. What kind of queries are you thinking of?
Den tis 19 mars 2024 22:54Galaxy Being @.***> skrev:
AFAICT, org-brain really doesn't "read in" all of a brain's entries and establish some in-memory cache for that whole brain, correct? It is only your visualize functionality that actually crawls JIT and creates the visualize view in the buffer, right? Also, there's no real way with org-brain to do a query or filter -- other than some terminal-level grep, or an org-mode tags filter, correct?
— Reply to this email directly, view it on GitHub https://github.com/Kungsgeten/org-brain/issues/396#issuecomment-2008198785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6KZOKSEMXCMBSTDRRO2ZDYZCX3DAVCNFSM6AAAAABEZ4ZZK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGE4TQNZYGU . You are receiving this because you commented.Message ID: @.***>
I've been studying the code, but I'm not finding where this first scan happens and how this cache is built. What is the very first entry point? I'm guessing the org-brain-visualize function. There's a section where it askes for "Entry: " with one option being "all" but I can't figure out how this list gets populated. I'm guessing it must be from this first-read cache that I can't find. Any help appreciated.
Headline entries are cached in the variable org-brain-headline-cache
. This is populated by org-brain-headline-entries-in-file
. File entries aren't cached. Lots of functions in org-brain
need to get all entries, and upon doing so org-brain-headline-entries-in-file
is run one way or another.
I haven't really reviewed the code, but I see org-brain works with org-id-locations, and I assume that calling org-brain-visualize traverses all the org files and their headers in the org brain directory, then loads into live memory, true? You're not using any of the standard graph data structures, storage methods, correct? So how big can my org brain get be before it's too big and performance lags?