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
Problem: Applications that load large amounts of data in a paginated manner could end up with large entity stores if no hard page refresh occurs. This is not necessarily a performance concern as entities are stored in an indexed data structure so lookups are fast, but it could lead to a big memory footprint.
Potential Solution: The only way currently to update the entities state is via the mergeEntities method, which does not provide a way to clear entities. The simplest solution to clearing old entities is to provide a database method void clear() that would reset the entity and query stores back to their initial (default) state. The developer could call this method periodically to ensure their entity/query stores do not get too big.
An ideal time to call this method would be on route changes, because in theory any route could be an entrypoint to the app, at which point the stores would be empty anyway. For this reason, calling clear on route changes would be natural and would not cause any unexpected behavior because the application should already be set up to handle an empty store at these times. I propose there should just be one clear method as opposed to clearEntities and clearStoredQueries, because i can't picture a use case where one would be called without calling the other.
The text was updated successfully, but these errors were encountered:
Problem: Applications that load large amounts of data in a paginated manner could end up with large entity stores if no hard page refresh occurs. This is not necessarily a performance concern as entities are stored in an indexed data structure so lookups are fast, but it could lead to a big memory footprint.
Potential Solution: The only way currently to update the entities state is via the mergeEntities method, which does not provide a way to clear entities. The simplest solution to clearing old entities is to provide a database method
void clear()
that would reset the entity and query stores back to their initial (default) state. The developer could call this method periodically to ensure their entity/query stores do not get too big.An ideal time to call this method would be on route changes, because in theory any route could be an entrypoint to the app, at which point the stores would be empty anyway. For this reason, calling clear on route changes would be natural and would not cause any unexpected behavior because the application should already be set up to handle an empty store at these times. I propose there should just be one clear method as opposed to clearEntities and clearStoredQueries, because i can't picture a use case where one would be called without calling the other.
The text was updated successfully, but these errors were encountered: