Skip to content

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

Merged
merged 1 commit into from
May 13, 2014

Conversation

sophiebits
Copy link
Collaborator

Should make #1350 better and will also take away any performance hit from #1157.

Test Plan:
grunt test

cc @sebmarkbage @jordwalke @nathansobo

@sophiebits
Copy link
Collaborator Author

(Depends on #1362.)

var flushBatchedUpdates = ReactPerf.measure(
'ReactUpdates',
'flushBatchedUpdates',
function() {
// Run these in separate functions so the JIT can optimize
Copy link
Member

Choose a reason for hiding this comment

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

😢

Copy link
Collaborator Author

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) {
Copy link
Member

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.

@sophiebits
Copy link
Collaborator Author

I'm sure you figured this out weeks ago but along with this change, ReactART needs to reference ReactUpdates.ReactReconcileTransaction instead of ReactComponent.ReactReconcileTransaction.

zpao added a commit that referenced this pull request May 13, 2014
Share reconcile transaction in batched updates
@zpao zpao merged commit a00199d into facebook:master May 13, 2014
josephsavona pushed a commit that referenced this pull request May 15, 2024
--- 

+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.
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.

2 participants