-
Notifications
You must be signed in to change notification settings - Fork 266
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: Server-side-like pagination via web worker (step 4) #6541
Comments
@Sean-McQ I had a question about the web worker - does it store "dehydrated" or "rehydrated" data? I was looking into the possibility of doing less hydration - maybe trying to only use this hydration code on a component by component basis (https://github.com/rancher/dashboard/blob/master/shell/plugins/dashboard-store/index.js#L98). And I couldn't remember if the web worker project is already doing that |
@catherineluse I'm not hydrating the list resources inside of the worker but that is baked into the mutation I use to load it into the store when I pass it to the UI thread. We could potentially bake the hydration step into the getter so that we're not storing the full class instances in there or preferably only instantiate the various row resources in the component that requests it and avoid having the store hydrate anything (in the case of lists). |
This ticket will be split to allow for the work for the Q1 release to be deliverable but then have additional work for a subsequent release. |
Edit - Snip. See #8527 |
Given change in direction, bumping out to 2.7 Q3. We should look at this work alongside #8507 |
Need to re-evaluate this ticket as part of our existing performance work. This didn't land but the backend plans changed. |
May not do this if we can get server-side pagination |
No longer applicable |
Instead of holding all resources in the VueX store, only hold the resources for the current page in a list.
A web worker presents a paginated resource UI to the UI - it fetches all resources of a given type and processes the web socket messages to keep those up to date.
When a list is requested by the UI, the web worker will sort, filter and paginate the resources required and return this back to the UI - which can store if in the VueX store.
When updates come in, the web worker processes those, determines if they affect any active pages, and if so, sends the updates to the UI which then updates the VueX store, resulting in the same reactivity we have now, so the list will auto update.
When a user leaves a page, the lists on it are removed and the web worker stops sending updates through - but keeps processing updates for the resources it holds (We may choose not to keep all resources in memory at a later time).
Additional context
The text was updated successfully, but these errors were encountered: