-
Notifications
You must be signed in to change notification settings - Fork 49k
Share reconcile transaction in batched updates #1358
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
Conversation
(Depends on #1362.) |
var flushBatchedUpdates = ReactPerf.measure( | ||
'ReactUpdates', | ||
'flushBatchedUpdates', | ||
function() { | ||
// Run these in separate functions so the JIT can optimize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very little time is spent in this function; everything that was in subfunctions before, still is.
Should make facebook#1350 better and will also take away any performance hit from facebook#1157. Test Plan: grunt test
ReactUpdates.ReactReconcileTransaction && batchingStrategy, | ||
'ReactUpdates: must inject a reconcile transaction class and batching ' + | ||
'strategy' | ||
); | ||
} | ||
|
||
function batchedUpdates(callback, param) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to complain and say that this doesn't really need ReactReconcileTransaction
to be injected. And we had a bunch of tests which were failing because they only inject the batching strategy (some flux-related code uses ReactUpdates directly). But then I just made those tests use ReactDefaultInjection
instead.
I'm sure you figured this out weeks ago but along with this change, ReactART needs to reference |
Share reconcile transaction in batched updates
--- +10 −1,698 lines [[insert impacc macro]] The ObjectShape stacks (#1350, #1358) used these tests to record changes in inferred types (and associated ObjectShapes), reference effects, and mutable ranges. Now that those PRs have landed, we can delete these tests. They are somewhat fragile (changing anytime HIR / printHIR is changed) and easily cause rebase/merge conflicts.
Should make #1350 better and will also take away any performance hit from #1157.
Test Plan:
grunt test
cc @sebmarkbage @jordwalke @nathansobo