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 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

This comment has been minimized.

Copy link
Owner

@louischatriot louischatriot commented Feb 25, 2014

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

This comment has been minimized.

@louischatriot

This comment has been minimized.

Copy link
Owner

@louischatriot louischatriot commented Feb 26, 2014

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

This comment has been minimized.

Copy link

@Ivshti 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

This comment has been minimized.

Copy link
Owner

@louischatriot louischatriot commented Feb 26, 2014

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
Projects
None yet
3 participants
You can’t perform that action at this time.