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: avoid unnecessary rerenders #7004

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

spereirag
Copy link
Contributor

Summary

My team currently has a fork of decap-cms with several custom plugins, some of them considerably costly in terms of render time. We noticed the render time became unbearably slow when loading a moderately long list (~15 elements) of one of said plugins. After a bit of debugging, we noticed a huge amount of component rerenders while the assets were loading, and the plugin wasn't even visible. The problem is fixed when using the existing prop isLoadingAsset to avoid updating the component while the assets are loading. This PR implements that fix.

Test plan

yarn test runs successfully

Test Suites: 1 skipped, 79 passed, 79 of 80 total
Tests:       652 skipped, 989 passed, 1641 total
Snapshots:   110 passed, 110 total
Time:        79.975 s
Ran all test suites.

Checklist

Please add a x inside each checkbox:

Copy link

netlify bot commented Dec 4, 2023

‼️ Deploy request for cms-demo rejected.

Name Link
🔨 Latest commit 5b8763b

Copy link

netlify bot commented Dec 4, 2023

Deploy Preview for decap-www canceled.

Name Link
🔨 Latest commit 4bb2170
🔍 Latest deploy log https://app.netlify.com/sites/decap-www/deploys/6581b5979795cd0007ac3ac1

@demshy demshy merged commit fdfb497 into decaporg:master Dec 19, 2023
16 checks passed
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.

None yet

2 participants