Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How many nodes can org-brain handle? #396

Open
borgauf opened this issue Mar 17, 2024 · 5 comments
Open

How many nodes can org-brain handle? #396

borgauf opened this issue Mar 17, 2024 · 5 comments

Comments

@borgauf
Copy link

borgauf commented Mar 17, 2024

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?

@Kungsgeten
Copy link
Owner

I don't know, I haven't stressed tested it.

@borgauf
Copy link
Author

borgauf commented Mar 19, 2024

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?

@Kungsgeten
Copy link
Owner

Kungsgeten commented Mar 20, 2024 via email

@borgauf
Copy link
Author

borgauf commented Mar 27, 2024

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.

@Kungsgeten
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants