Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Performance and memory usage on large collections #143

Open
valentinalexeev opened this issue Jan 31, 2019 · 3 comments
Open

Performance and memory usage on large collections #143

valentinalexeev opened this issue Jan 31, 2019 · 3 comments

Comments

@valentinalexeev
Copy link

With canner 2.0.10 and above and Google Firestore as a back-end I'm running into performance problems and out-of-memory errors when editing collections with 400+ entities.

A single edit in <array ui="table"/> can result in jump in memory usage by ~400MB.

The issue seems to come from React component state update sequence where canner hocs/utils.js function parseConnectionToNormal traverses the whole collection on any view, save or edit of any field in any entity.

The memory snapshot after single save operation:
canner-memory png

Trace to the function:
canner-memory-code

The associated schema definition: https://gist.github.com/valentinalexeev/9fa39f3aabb1d83027c1b99ba097dc1b.

As a temporary workaround to avoid OOM I can use <array ui="tableRoute"/> however due to issue with filter state which is not saved on navigation it becomes unusable for editors to work with large content set.

@valentinalexeev
Copy link
Author

It seems that #132 issue can be related to this as every update of every input launches full collection traversal as well.

@wwwy3y3
Copy link
Contributor

wwwy3y3 commented Feb 1, 2019

hi @valentinalexeev

After the investigation, we knew exactly where we should fix and we're fixing it.

We also need some time to test it.

The patch will be released soon and we'll keep you updated.

thanks!

@valentinalexeev
Copy link
Author

Dear @wwwy3y3, is there any update on this issue? So far I see the current v3 version still has the same code and memory issues in non-async mode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants