-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
I have an extremely large application (over 40k lines of code) which heavily relies on backbone relational. Using backbone relational has certainly come in handy in many regards but we are soon realizing that there seems to be a huge price to pay for large applications. I'm writing this with the hopes that my realization is wrong.
One of our bigger Models often ends up in a Tree structure with over 10k child nodes. This Tree has more than 10 levels of nestings with each child node representing a unique Model or a Collection. The problem at hand is a major memory retention that happens due to the Store.
Following are the approaches I've tried with results noticed:
- Perform a deep cleanup - Iterate through the whole
TreecallingBackbone.Relational.store.unregisteron each model. This works but sometimes takes minutes to complete which is completely unacceptable from a user experience perspective. - Backup the
Storebefore loading theTreeand restore it to its original state. I've also triedunregisteringall newCollectionsinspired by theStore.resetfunction. This approach seems to work unreliably and seems extremely hacky. - Introducing a new scope by using
addModelScopeandremoveModelScope. This seems to have no affect and if my understanding is correct, themodel scopeis set only fordefinitionsand notinstances.
Is there no graceful way to perform a memory cleanup?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels