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

Find keeps query objects in heap memory #8833

Open
vinidalmagro opened this issue Nov 22, 2023 · 0 comments
Open

Find keeps query objects in heap memory #8833

vinidalmagro opened this issue Nov 22, 2023 · 0 comments

Comments

@vinidalmagro
Copy link

Issue

I have a table that has several documents that reach close to 2mb ~ 4mb and I use the find method to search just some fields in these documents and with some specific filters. I always work with creating indexes for these queries and it all works very well.

Recently I have noticed a significant increase in the application's memory consumption in some processes and they all involve the find method.

It seems that even after the promise is completed, the objects that the library uses maintains the connection with the object in memory, preventing the garbage collector from removing these objects.

Only after a new query is executed are the objects "released" and the garbage collector can do its work.

image

Info

  • Environment: Browser, AngularJS, PouchDB 7.2.1
  • Platform: Chrome
  • Adapter: indexeddb
  • Server: CouchDB
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

1 participant