Re: org-id-locations as a large-scale database store?

2024-03-12 Thread Ihor Radchenko
Laurence von Bottorff  writes:

> Any docs on what org-id-locations is about, who/what uses it?

It is an internal variable.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-id-locations as a large-scale database store?

2024-03-12 Thread Laurence von Bottorff
Any docs on what org-id-locations is about, who/what uses it?

On Tue, Mar 12, 2024 at 1:44 PM Ihor Radchenko  wrote:

> yeti  writes:
>
> >> Does org-brain have anything to do with org-id-locations?
> >
> > I think so...
> >
> > E.g. org-brain.el 788-794:
> >
> > ---8<---
> > (defun org-brain-entry-from-id (id)
> >   "Get entry from ID."
> >   (unless org-id-locations (org-id-locations-load))
> >   (when-let ((path (gethash id org-id-locations)))
> > (list (org-brain-path-entry-name path)
> >   (org-brain-headline-at (org-id-find id t))
> >   id)))
>
> That's redundant. Calling `org-id-find' would suffice (org-id-find
> internally arranges org-id-locations to be updated).
>
> In any case, loading and searching id locations scales well for
> thousands of entries - I currently have 60+k entries there without
> issues.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>
>

-- 
⨽
Lawrence Bottorff
Grand Marais, MN, USA
borg...@gmail.com


Re: org-id-locations as a large-scale database store?

2024-03-12 Thread Ihor Radchenko
yeti  writes:

>> Does org-brain have anything to do with org-id-locations?
>
> I think so...
>
> E.g. org-brain.el 788-794:
>
> ---8<---
> (defun org-brain-entry-from-id (id)
>   "Get entry from ID."
>   (unless org-id-locations (org-id-locations-load))
>   (when-let ((path (gethash id org-id-locations)))
> (list (org-brain-path-entry-name path)
>   (org-brain-headline-at (org-id-find id t))
>   id)))

That's redundant. Calling `org-id-find' would suffice (org-id-find
internally arranges org-id-locations to be updated).

In any case, loading and searching id locations scales well for
thousands of entries - I currently have 60+k entries there without
issues.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-id-locations as a large-scale database store?

2024-03-12 Thread yeti
Ihor Radchenko  writes:

> yeti  writes:
>
>> Laurence von Bottorff  writes:
>>
>>> So again, is this org-brain approach DOA for anything big?
>>
>> I like it, but even my small pool of notes is slow with org-brain.
>>
>> ---8<---
>> ~ $ hash-table-size $org-id-locations
>> 1322
>> --->8---
>
> Does org-brain have anything to do with org-id-locations?

I think so...

E.g. org-brain.el 788-794:

---8<---
(defun org-brain-entry-from-id (id)
  "Get entry from ID."
  (unless org-id-locations (org-id-locations-load))
  (when-let ((path (gethash id org-id-locations)))
(list (org-brain-path-entry-name path)
  (org-brain-headline-at (org-id-find id t))
  id)))
--->8---

-- 
I do not bite, I just want to play.




Re: org-id-locations as a large-scale database store?

2024-03-12 Thread Ihor Radchenko
yeti  writes:

> Laurence von Bottorff  writes:
>
>> So again, is this org-brain approach DOA for anything big?
>
> I like it, but even my small pool of notes is slow with org-brain.
>
> ---8<---
> ~ $ hash-table-size $org-id-locations
> 1322
> --->8---

Does org-brain have anything to do with org-id-locations?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org-id-locations as a large-scale database store?

2024-03-12 Thread Rick Lupton
You might be interested in https://www.orgroam.com/ which is a broadly similar 
idea to org-brain but uses a SQLite database to track id locations and links.



Re: org-id-locations as a large-scale database store?

2024-03-12 Thread yeti
Laurence von Bottorff  writes:

> So again, is this org-brain approach DOA for anything big?

I like it, but even my small pool of notes is slow with org-brain.

---8<---
~ $ hash-table-size $org-id-locations
1322
--->8---

-- 
I do not bite, I just want to play.