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

[Fleet] Prevent excessive re-renders of package list grid #142864

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Oct 6, 2022

Summary

While developing a change to the package list grid I noticed that on every page load we were re-rendering the package grid list approx 15 times including re-filtering and sorting the results. I have added some memoisation to reduce this to 1 -3 renders depending on if there is a category filter, search query in the URL etc.

@hop-dev hop-dev added technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team labels Oct 6, 2022
@hop-dev hop-dev requested a review from a team as a code owner October 6, 2022 14:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@hop-dev
Copy link
Contributor Author

hop-dev commented Oct 10, 2022

@elasticmachine merge upstream

@hop-dev hop-dev enabled auto-merge (squash) October 10, 2022 09:15
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 912.5KB 912.6KB +116.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@hop-dev hop-dev merged commit b5fad2e into elastic:main Oct 10, 2022
@kibanamachine kibanamachine added v8.6.0 backport:skip This commit does not require backporting labels Oct 10, 2022
@hop-dev hop-dev deleted the bugfix-excessive-re-renders branch October 10, 2022 10:00
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 11, 2022
…2864)

* prevent high number of re-renders of package grid

* fix hook tests
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 14, 2022
…2864)

* prevent high number of re-renders of package grid

* fix hook tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants