Sebastian Wålinder <> writes:

> It appears that indirect buffers duplicate the entire org element cache from 
> the base buffer whenever created.

Not exactly. Only link to the cache root is copied and some cache
elements may not be garbage-collected.

> Running `memory-report` indicates that each indirect buffer has the same 
> memory blueprint.

> This becomes a massive issue with large org files.
> My in my 160 000 line org file, the org element cache takes 100 mb, and so 
> each new indirect buffer consumes an additional 100 mbs of memory.

This has to be a bug in `memory-report'. Most of the cache elements will
be referenced by link and thus there should be double-counting going on 

> I also wonder if this means the caching is performed by each indirect buffer 
> independently, and doesn't carry over.

Caching is using base buffer actually.
I guess we can explicitly set reference to the cache root to nil in
indirect buffers.

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

Reply via email to