Skip to content
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

Closed
nwmac opened this issue Jul 28, 2022 · 8 comments
Closed

Performance: Server-side-like pagination via web worker (step 4) #6541

nwmac opened this issue Jul 28, 2022 · 8 comments

Comments

@nwmac
Copy link
Member

nwmac commented Jul 28, 2022

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

@nwmac nwmac added this to the v2.7.0 milestone Jul 28, 2022
@nwmac nwmac changed the title Performance: Server-side pagination via web worker Performance: Server-side-like pagination via web worker Jul 28, 2022
@richard-cox richard-cox assigned ghost Aug 12, 2022
@catherineluse
Copy link
Contributor

@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

@ghost
Copy link

ghost commented Sep 14, 2022

@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).

@gaktive
Copy link
Member

gaktive commented Jan 4, 2023

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.

@gaktive gaktive added the size/5 Size Estimate 5 label Jan 4, 2023
@richard-cox richard-cox modified the milestones: v2.7.next1, v2.7.next2 Jan 10, 2023
@richard-cox richard-cox changed the title Performance: Server-side-like pagination via web worker Performance: Server-side-like pagination via web worker (step 4) Jan 24, 2023
@richard-cox
Copy link
Member

richard-cox commented Jan 27, 2023

Edit - Snip. See #8527

@richard-cox
Copy link
Member

Given change in direction, bumping out to 2.7 Q3. We should look at this work alongside #8507

@richard-cox richard-cox modified the milestones: v2.7.next2, v2.7.next3 Apr 21, 2023
@nwmac nwmac modified the milestones: v2.7.next3, v2.7.next4 Jun 28, 2023
@gaktive gaktive unassigned ghost Aug 3, 2023
@gaktive gaktive modified the milestones: v2.8.0, v2.8.next1 Aug 3, 2023
@gaktive
Copy link
Member

gaktive commented Aug 3, 2023

Need to re-evaluate this ticket as part of our existing performance work. This didn't land but the backend plans changed.

@nwmac
Copy link
Member Author

nwmac commented Aug 16, 2023

May not do this if we can get server-side pagination

@nwmac nwmac modified the milestones: v2.8.next1, v2.8.x Aug 16, 2023
@richard-cox
Copy link
Member

No longer applicable

@richard-cox richard-cox closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@zube zube bot closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants