Obsidian build without V8 pointer compression

The default Electron/V8 comes with pointer compression this limits the per process memory footprint to 4GB.

Pointer compression (aka memory cage) compresses pointers to 32 bit. As a result the total addressable space is 4GB.

This makes a lot of sense if you can fit in 4GB heaps, but the current indexing implementation doesn’t.
Related Don't reindex whole file every few keystrokes

My vault constantly crashes with with OOM errors during indexing. This can happen if I type a character in certain files or on startup during indexing. Suffice to say it makes Obsidian unusable.

One workaround is to disable this

Lastly, there are workarounds for apps that really need a larger heap size. For example, it is possible to include a copy of Node.js with your app, which is built with pointer compression disabled, and move the memory-intensive work to a child process. Though somewhat complicated, it is also possible to build a custom version of Electron with pointer compression disabled, if you decide you want a different trade-off for your particular use case

Would you be able to get a test build with this disable so we could try it out?

1 Like