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

perf(useResizeColumns): optimize dispatch count #3231

Merged

Conversation

theopak
Copy link

@theopak theopak commented Apr 22, 2021

👋 hey internet, here's an optimization that significantly improves column resize performance

  • i'm consistently seeing a 30-50% reduction in the number of calls to dispatch() when i interactively drag the handle back and forth in the "column-resizing" demo
  • want to debug this even farther locally or on codesandbox?
    • this commit demonstrates how to add some console statements to show the number of calls: 37a69f5
    • you can pull this branch and revert that commit to measure this interactively yourself if you want to
  • partially addresses column resize is not optimized and hard to optimize #3165

theopak added 3 commits April 22, 2021 12:37

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@vercel
Copy link

vercel bot commented Apr 22, 2021

Someone is attempting to deploy a commit to a Personal Account owned by @tannerlinsley on Vercel.

@tannerlinsley first needs to authorize it.

@vercel
Copy link

vercel bot commented Apr 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-table/6RtEDWoTet8o4gw8HadbUZLAk9Qy
✅ Preview: https://react-table-git-fork-theopak-theopak-2021-04-22-usere-b39ea5.vercel.app

@bhefter
Copy link

bhefter commented Apr 22, 2021

👍 I tested this locally and was able to log notably fewer dispatch calls and no noticeable side effects

@theopak
Copy link
Author

theopak commented May 13, 2021

hey! @tannerlinsley please lmk if there's anything else you want to see to help review this pr

subhamayd2 added a commit to subhamayd2/react-table that referenced this pull request Jul 16, 2021
subhamayd2 added a commit to subhamayd2/react-table that referenced this pull request Jul 16, 2021
@subhamayd2
Copy link

This works perfectly. Hope this gets merged soon.

@FezVrasta
Copy link
Contributor

What's the plan to get this merged and released? Anything we can do to help with it?

glin added a commit to glin/reactable that referenced this pull request Jul 26, 2021
Pulls in patch to optimize the number of calls to dispatch(),
from TanStack/table#3231.
@megastas
Copy link

Guys, why still not merged?

@theopak
Copy link
Author

theopak commented Sep 23, 2021

hey! @tannerlinsley please lmk if there's anything else you want to see to help review this pr

polite bump!

@theopak theopak changed the base branch from alpha to v7 January 26, 2022 18:41
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This pull request is being marked as stale (no activity in the last 14 days)

@github-actions github-actions bot added the Stale label Apr 8, 2022
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This pull request has been detected as stale (no activity in the last 14 days) and automatically closed. It's very likely that your pull request has remained here this long because it introduces breaking changes to the v7 API. React Table v8 is currently in alpha (soon beta!) and already contains bug fixes, performance improvements and architectural changes that likely address the issue this pull request is meant to solve.

  • If your v7 pull request has been previously labeled as having breaking changes, please try the new v8 alpha/beta releases
  • If your v7 pull request has not already been labeled as a breaking change, open a new pull request.
  • If this was a v8 pull request and was closed by mistake, please reopen or leave a comment below.

@github-actions github-actions bot closed this Apr 8, 2022
@FezVrasta
Copy link
Contributor

😢

@tannerlinsley
Copy link
Collaborator

I'll reopen this if anyone wants to do the research on how supported RAF is without a polyfill

@FezVrasta
Copy link
Contributor

I'll reopen this if anyone wants to do the research on how supported RAF is without a polyfill

IE10+

@tannerlinsley
Copy link
Collaborator

Good enough for me.

@tannerlinsley tannerlinsley reopened this Apr 8, 2022
@tannerlinsley
Copy link
Collaborator

Before I can merge this, I need to set up my semantic release to handle other branches/ previous versions.

@tannerlinsley tannerlinsley merged commit f2e8827 into TanStack:v7 Apr 8, 2022
@theopak theopak deleted the theopak/2021-04-22-useresizecolumn-perf-fix branch April 18, 2022 22:19
scottjudy added a commit to scottjudy/reactable that referenced this pull request Jun 20, 2023
Pulls in patch to optimize the number of calls to dispatch(),
from TanStack/table#3231.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants