8000 perf(entity.get): add attribute change tracking by becomingbabyman · Pull Request #15 · homebaseio/homebase-react · GitHub
[go: up one dir, main page]

Skip to content

perf(entity.get): add attribute change tracking #15

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

Merged
merged 2 commits into from
Nov 16, 2020
Merged

Conversation

becomingbabyman
Copy link
Member
  • improve re-render performance by ~2x on light pages
  • improve re-render performance by ~4x on heavy pages with ~10k components
  • only trigger re-renders on attributes that have changed
  • instrument entity.get to track used attributes and scope them to their respective hook
  • update the todo example to better leverage these new performance features
  • add performance section to readme

- improve re-render performance by ~2x on light pages
- improve re-render performance by ~4x on heavy pages with ~10k components
- only trigger re-renders on attributes that have changed
- instrument `entity.get` to track used attributes and scope them to their respective hook
- update the todo example to better leverage these new performance features
- add performance section to readme
@becomingbabyman becomingbabyman added the enhancement New feature or request label Nov 15, 2020
@becomingbabyman becomingbabyman self-assigned this Nov 15, 2020
@becomingbabyman
Copy link
Member Author

@rubinovitz when you get a chance to review this please also QA it locally. It touches a lot and I'd love another set of eyes on it.

@rubinovitz
Copy link
Contributor
rubinovitz commented Nov 15, 2020 via email

Copy link
Contributor
@rubinovitz rubinovitz left a comment

Choose a reason for hiding this comment

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

@smothers I'm getting "Error: Invalid Hook" call when I try to render the Counter example now.

@rubinovitz
Copy link
Contributor

@smothers oh standby I think this is the problem I had last time I tried to test locally and it thinks there's two Reacts. 😬 I'll do the fix I did last time and test again in the morning. You don't need to do anything.

@rubinovitz
Copy link
Contributor
rubinovitz commented Nov 16, 2020

@smothers I'm still getting the error after npm link $local_dir/homebase-react/node_modules/react , which fixed the error last time it was a double React issue. Do you get an error on your end running this version in a React js app?

@becomingbabyman
Copy link
Member Author

I'm getting the error if I use yarn, but npm lets me link to the local package

Copy link
Contributor
@rubinovitz rubinovitz left a comment

Choose a reason for hiding this comment

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

LGTM 🏎

@becomingbabyman becomingbabyman merged commit 2cba32f into master Nov 16, 2020
@becomingbabyman becomingbabyman deleted the use-memo branch November 16, 2020 21:52
@github-actions
Copy link

🎉 This PR is included in version 0.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0