Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
changes() leaks memory #6502
It seems that
What happens is that it will "slow down" after first ~50 000 seqs - because of excessive memory usage (few seconds and it's hundreds MBs). I am not sure if it relates to any existing issue so I am creating new one.
This might be resolved by:
Just stumbled on this too, we have been facing a memory leak on https://github.com/algolia/npm-search and have been searching for it a bit.
I will use this
We are using the http adapter, but strangely the code of the http adapter sets return_docs to true by default, see
Not sure this as anything to do with our leak but will try.
added a commit
May 15, 2017
@willholley If you need more insights let us know, for now this is mostly a documentation issue. The doc says that if you are only using a http layer or DB then you are fine, changes will not leak. But that's not the case because the actual http pouchdb layer sets returnDocs: true by default.
referenced this issue
Jun 15, 2017
So yup the documentation is wrong here, however we should not be setting different defaults for http or not, we should fix the documentation for whether this option is available for http adapters
Seperately we could change the default for all adapters to returnDocs = false, or more drastically remove the option for
The documentation is wrong on two aspects: we say that the http adapter is not using returnDocs and that's it's false by default.
You can passe returnDocs when using an http adapter and it's true by default (which causes memleaks).
I am down for this, if you can avoid memleaks situations automatically and warn people it's a better default because debugging mem leaks is awful.
FWIW, we just spent a long time wondering where our memory is being retained in a long-running process perusing
Anecdotally, I didn't even know you can use the