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] Reduce useObserver gc pressure #2995

Merged
merged 2 commits into from
Jun 20, 2021
Merged

[Perf] Reduce useObserver gc pressure #2995

merged 2 commits into from
Jun 20, 2021

Conversation

Bnaya
Copy link
Member

@Bnaya Bnaya commented Jun 20, 2021

Tiny performance improvement, create ObjectToBeRetainedByReact once per component instance and not every component render

Code change checklist

  • Added/updated unit tests
  • Updated /docs. For new functionality, at least API.md should be updated
  • Verified that there is no significant performance drop (npm run perf)

@changeset-bot
Copy link

changeset-bot bot commented Jun 20, 2021

🦋 Changeset detected

Latest commit: 1526b65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx-react-lite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Bnaya Bnaya requested a review from danielkcz June 20, 2021 12:26
@Bnaya Bnaya marked this pull request as ready for review June 20, 2021 13:34
@iChenLei iChenLei requested a review from urugator June 20, 2021 13:50
Copy link
Collaborator

@urugator urugator left a comment

Choose a reason for hiding this comment

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

add changeset

Tiny performance improvement,  create ObjectToBeRetainedByReact once per component instance
@Bnaya Bnaya changed the title [Perf] Create actual object once [Perf] Reduce useObserver gc pressure Jun 20, 2021
@Bnaya
Copy link
Member Author

Bnaya commented Jun 20, 2021

@urugator can please have a look on my changeset file?
looks valid?

@urugator urugator merged commit 10c762c into main Jun 20, 2021
@github-actions github-actions bot mentioned this pull request Jun 20, 2021
@urugator
Copy link
Collaborator

Just in case you're not aware, you can run yarn changeset from root dir...

@Bnaya Bnaya deleted the use-observer-iteration branch June 20, 2021 16:48
@Bnaya
Copy link
Member Author

Bnaya commented Jun 20, 2021

Donno why, it insists to create major bump, so i had
To edit it manually

@urugator
Copy link
Collaborator

If you were confused by the controls the same way as I was ... you have to pick choices with spacebar and confirm with enter...

@Bnaya
Copy link
Member Author

Bnaya commented Jun 21, 2021

If you were confused by the controls the same way as I was ... you have to pick choices with spacebar and confirm with enter...

The only option i had is to make major bump

@urugator
Copy link
Collaborator

urugator commented Jun 21, 2021

When you hit enter (without picking), it should ask for minor, enter again and it should fallback to patch...

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.

3 participants