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

fix: improve profiles page load by ~8s with 200 more routes #140

Merged
merged 6 commits into from
May 25, 2022

Conversation

sdg9
Copy link
Collaborator

@sdg9 sdg9 commented May 25, 2022

Closes #139

One home page (routes) every time you expanded or collapsed a single item ALL routes would re-render. This was visually evident with 200ish routes. I resolved by memoizing the setState callback and instead of passing the selected route string to ALL components (changed every selection), I pulled the conditional check up to the routes page so that it only passed a boolean to each component (so that ONLY the component(s) which changed will rerender).

On profile page instead of making api call to select all routes I just make api call to get active variants, then I perform check against that. This helped reduce time it took to process especially when there were hundreds of routes by several seconds.

@nx-cloud
Copy link

nx-cloud bot commented May 25, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 50a34d4. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 6 targets

Sent with 💌 from NxCloud.

@NSwanson1 NSwanson1 merged commit 4f8fb6a into caribou-crew:main May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slowness on client
2 participants