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 performance issues with large tables #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hjacobs
Copy link

@hjacobs hjacobs commented Jul 21, 2021

This address #50: sorting large tables (~5k rows) was causing ~20 second hang that hogs CPU and makes the whole browser unresponsive. This was caused by too many "recalculating browser styles" when doing appendChild on the tbody. Moving the nodes temporarly into a DocumentFragment and then adding the fragment to the body will cause less browser style calculations and decreased the sorting of large tables from >20s to <3s on my machine.

@hjacobs
Copy link
Author

hjacobs commented Jul 21, 2021

Also using this patched version in Kubernetes Resource Report: https://codeberg.org/hjacobs/kube-resource-report/pulls/27

mayank941 pushed a commit to mayank941/kuberesource that referenced this pull request Aug 25, 2021
`sortable.min.js` has a problem with large (~5k rows) tables (browser stuck ~20s). This uses the patched version from HubSpot/sortable#54

Co-authored-by: Henning Jacobs <[email protected]>
Reviewed-on: https://codeberg.org/hjacobs/kube-resource-report/pulls/27
Co-authored-by: Henning Jacobs <[email protected]>
Co-committed-by: Henning Jacobs <[email protected]>
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.

1 participant