-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Shrink Atom and Reaction using a bitfield #3901
Conversation
🦋 Changeset detectedLatest commit: 281179f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Looking great again, thanks a lot! |
My project stopped working after this update. Will check exactly, what's happening |
I'll try to make a repro case this weekend and if it succeeds send a PR over to bump the version. |
Following on from #3880, use a bitfield to reduce the size of
Atom
andReaction
. Large apps can have 10s or 100s of thousands of these. Also further shrinkComputedValue
by storingdiffValue
in the bitfield, because it's only ever0
or1
.Memory Savings
ComputedValue
Atom
ObservableValue
(inherits fromAtom
)Reaction
Name Changes
Note this PR changes the names of some members of the above classes to get around the problem mentioned here: #3880 (comment). If these are part of a documented, stable public API then we will need to find another solution.
Soaking Time
We discussed here #3880 (comment) that we should let the previous changes to
ComputedValue
soak for a bit to flush out any issues. We have been shipping those changes for a few weeks in production now and haven't seen any problems yet.Code change checklist
/docs
. For new functionality, at leastAPI.md
should be updatedyarn mobx test:performance
)