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

Improve performance in cases when table is hiding #10490

Merged
merged 5 commits into from Sep 5, 2023

Conversation

budnix
Copy link
Member

@budnix budnix commented Aug 31, 2023

Context

The PR improves the component performance in cases when the table is mounted in places where the container element is hidden and shown alternately. For example in Tabs.

I found that the table recalculated its sizes after it detects its root element is hidden (display: "none") - unnecessarily, I think. The recalculation is time-consuming, so In this PR, I changed the logic to do a recalculation thing only when the element is shown. Thanks to that, there is no lag between switching the tabs as the Handsontable after showing the tab again uses the cached values.

How has this been tested?

I tested the changes locally, and I covered the change with new tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Related issue(s):

  1. fixes https://github.com/handsontable/dev-handsontable/issues/975

Affected project(s):

  • handsontable

Checklist:

@budnix budnix self-assigned this Aug 31, 2023
@budnix budnix marked this pull request as ready for review August 31, 2023 13:28
@budnix budnix requested a review from wszymanski August 31, 2023 13:28
Copy link
Contributor

@wszymanski wszymanski left a comment

Choose a reason for hiding this comment

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

Good job 👍

@budnix budnix merged commit 9b2cada into develop Sep 5, 2023
21 checks passed
@budnix budnix deleted the feature/dev-issue-531 branch September 5, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants