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

Memory footprint #144

Closed
eldad87 opened this issue Feb 25, 2014 · 5 comments
Closed

Memory footprint #144

eldad87 opened this issue Feb 25, 2014 · 5 comments

Comments

@eldad87
Copy link

eldad87 commented Feb 25, 2014

Hey,
Can you please introduce an option not to use cache to decrease memory footprint?

My idea is to place the db files in a ram-disk and by doing so to avoid NodeJS 2G memory limitation.

Thanks!

@louischatriot
Copy link
Owner

Hello,

That's not possible to not use the cache as all find operations do not use the disk. That's also a very big change which I feel is outside of NeDB's scope so I will review a PR if any but I won't do it.

I'm curious as to how a ramdisk can avoid Nodejs' 2GB limitation though, I wouldn't have thought it was possible ?

@eldad87
Copy link
Author

eldad87 commented Feb 26, 2014

@louischatriot
Copy link
Owner

I was not asking how to make a ramdisk :) I just don't see how you can use it to bypass Node.js' 2GB heap limoitation. In my opinion that's just not possible. We'll have to wait for improvements to the V8

@Ivshti
Copy link

Ivshti commented Feb 26, 2014

I guess @eldad87's idea is to modify NeDB to load documents directly from the DB file instead of keeping all documents in memory. Then, you can copy the DB file to a ramdisk at start-up.

@louischatriot
Copy link
Owner

OK. My point is that whatever we do, NeDB's needs the documents to be in memory to perform find operations. There are of course ways to avoid that but it's a lot of work and totally outside of NeDB's scope. If anyone tries it I'll happily review a PR though :)

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

3 participants