Improve performance for node reordering in FabricReconciler
Summary: This diff improves performance of re-layout and delivery of OnLayout events for Fabric surfaces. Reviewed By: fkgozali Differential Revision: D8622718 fbshipit-source-id: 703b6c3ca70b570e8fb79ae1c1e8d9e8fcd38658
This commit is contained in:
parent
6bbc1b7b96
commit
a07b66026d
|
@ -88,7 +88,7 @@ public class FabricReconciler {
|
|||
for (int k = firstRemovedOrAddedViewIndex; k < newList.size(); k++) {
|
||||
ReactShadowNode newNode = newList.get(k);
|
||||
if (newNode.isVirtual()) continue;
|
||||
enqueueUpdateProperties(newNode, null);
|
||||
enqueueUpdateProperties(newNode, newNode.getOriginalReactShadowNode());
|
||||
viewsToAdd.add(new ViewAtIndex(newNode.getReactTag(), k));
|
||||
List previousChildrenList = newNode.getOriginalReactShadowNode() == null ? null : newNode.getOriginalReactShadowNode().getChildrenList();
|
||||
manageChildren(newNode, previousChildrenList, newNode.getChildrenList());
|
||||
|
|
|
@ -1221,8 +1221,8 @@ public class ReactShadowNodeImpl implements ReactShadowNode<ReactShadowNodeImpl>
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreenLayout(ReactShadowNode prevNode) {
|
||||
assertNotSealed();
|
||||
mScreenHeight = prevNode.getScreenHeight();
|
||||
mScreenWidth = prevNode.getScreenWidth();
|
||||
mScreenX = prevNode.getScreenX();
|
||||
|
|
Loading…
Reference in New Issue