You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use upserts to update data pulled from our API for offline storage in a electron client app. However, we are upserting a collection of thousands of relatively small documents and I'm seeing the CPU usage spike for a long duration while upserting this data into an nedb database. It becomes so intense on the CPU that the entire application stops responding as a result(sometimes crashing the chrome dev tools). It seems to only happen starting with this collection(its probably the largest) and then every collection after that seems to just slow to a crawl and consume 100% CPU for several minutes.
So additional info the upsert query is leveraging indices, because we are querying the document id for the upsert. We do a single upsert at a time for each document, because as far as I'm aware there is no means of bulk upserts. After running a CPU profile I've found that the most time is spent indexing into an AVLTree(BST), so I feel it may have something to do with indexing.
The text was updated successfully, but these errors were encountered:
We use upserts to update data pulled from our API for offline storage in a electron client app. However, we are upserting a collection of thousands of relatively small documents and I'm seeing the CPU usage spike for a long duration while upserting this data into an nedb database. It becomes so intense on the CPU that the entire application stops responding as a result(sometimes crashing the chrome dev tools). It seems to only happen starting with this collection(its probably the largest) and then every collection after that seems to just slow to a crawl and consume 100% CPU for several minutes.
So additional info the upsert query is leveraging indices, because we are querying the document id for the upsert. We do a single upsert at a time for each document, because as far as I'm aware there is no means of bulk upserts. After running a CPU profile I've found that the most time is spent indexing into an AVLTree(BST), so I feel it may have something to do with indexing.
The text was updated successfully, but these errors were encountered: