-
Notifications
You must be signed in to change notification settings - Fork 14
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
Performance Improvements #49
Comments
The above would allow manual management of a performance problem that we are seeing. If we click on 15 pages of a grid view in a rolw, the response eventually turns from ~1s to about ~2 or 3s, and this is due to the filtersMap having to call updateContent for each location in the store when 1 location is pushed in. I could spike out a function and related tests for you if you would like. |
Great question but honestly I'm not sure it's that simple. Imagine this scenario (assuming this is the setup you are about to implement to fix the perf issue)
The only part of my apps where I've found "removing" a filterMap was a good idea is when you fetch it in a route and pass it down to the controller/component. In that case you could "throw out" the filterMap (array proxy) when you leave that route because you know for sure the component that used it was also destroyed. (example here from the tests in simple-store) In your situation I'd say you have 3 options
|
Hey Toran! Looking at some perf issues related to
filtersMap
. Could an API be exposed for us to clearfiltersMap
, but keep thearray
andidentityMap
around? Basically, for every push of a location, it will look at source and callupdateFilters
andupdateContent
on each location. So if in a grid view, thelocation
array gets larger and larger, and there is a filterFunc that looks at location (in many to many situations there is a filterFunc that looks at location for its id to see if it is in the join model), that filter set gets more expensive.The reason to clear out filtersMap and not just use store.clear is b/c for types such as
location-status
that might be bootstrapped, we might want to clear thefiltersMap
, but not clear the locale cache of those objects.The text was updated successfully, but these errors were encountered: