react-native/ReactCommon/fabric/uimanager
Valentin Shergin e8ec1cb16a Fabric: The diffing algorithm does not use source nodes anymore
Summary:
@public
... and it's as efficient as it was before.

The previous version of the algorithm used `sourceNode` reference to know the previous state of the node to call the algorithm recursively.
That wasn't so good because of several reasons:
 - It was fragile because we had two different sources of the truth of the "previous state of the tree": committed tree and source node pointer;
 - We had to store weak pointers to source nodes inside cloned nodes. That is not free in terms of performance;
 - The old approach introduced a constraint that all previously used and now reinserted nodes must be cloned to update source node (otherwise, the algorithm would regenerate instructions recreating already existing subtrees);
 - That cloning required access to `isSealed` flag which is supposed to be a debug-only thing (that actually affects performance and must be compile-out for release builds).

The new approach compares nodes with same react tag and naturally cloning-artifacts resilient.

Yes, the new approach uses a map of inserted nodes, but the previous one already had it (otherwise there is no way to tell which nodes should be "deleted"). And anyway, this is a very little map that exists for a very little period of time.

Reviewed By: mdvacca

Differential Revision: D8709953

fbshipit-source-id: 027abb326cf45f00f7bb0bbd7c4e612578268c66
2018-07-06 14:49:07 -07:00
..
tests iOS: added placeholder test setup for fabric graphics/uimanager/view targets 2018-03-23 22:22:20 -07:00
BUCK Fix deprecated glob usage. 2018-06-23 18:33:48 -07:00
ComponentDescriptorFactory.h Fabric: Introducing `ContextContainer` 2018-06-22 07:32:49 -07:00
ComponentDescriptorRegistry.cpp Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
ComponentDescriptorRegistry.h Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
ContextContainer.cpp Fabric: Introducing `ContextContainer` 2018-06-22 07:32:49 -07:00
ContextContainer.h Fabric: Introducing `ContextContainer` 2018-06-22 07:32:49 -07:00
Differentiator.cpp Fabric: The diffing algorithm does not use source nodes anymore 2018-07-06 14:49:07 -07:00
Differentiator.h Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
FabricUIManager.cpp iOS: avoid crash because of null eventTarget 2018-07-02 18:02:35 -07:00
FabricUIManager.h Remove instanceHandle, pass event target instead + add dispatchToEmptyTarget 2018-06-29 15:32:27 -07:00
Scheduler.cpp Fabric: Getting rid of many `auto &&` 2018-06-22 07:32:49 -07:00
Scheduler.h Fabric: Introducing `ContextContainer` 2018-06-22 07:32:49 -07:00
SchedulerDelegate.h Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
SchedulerEventDispatcher.cpp Remove instanceHandle, pass event target instead + add dispatchToEmptyTarget 2018-06-29 15:32:27 -07:00
SchedulerEventDispatcher.h Remove instanceHandle, pass event target instead + add dispatchToEmptyTarget 2018-06-29 15:32:27 -07:00
ShadowTree.cpp Fabric: Dispatching `onLayout` events to only nodes which requested it 2018-06-22 18:46:39 -07:00
ShadowTree.h Fabric: Subtle changes that make GCC compiler happy 2018-06-29 12:18:27 -07:00
ShadowTreeDelegate.h Migrate Android sources to MIT license header 2018-05-31 15:37:30 -07:00
TreeMutationInstruction.cpp Fabric: Improved prettyprinting of TreeMutationInstruction 2018-07-06 14:49:06 -07:00
TreeMutationInstruction.h Fabric: Improved prettyprinting of TreeMutationInstruction 2018-07-06 14:49:06 -07:00
UIManagerDelegate.h Fabric: Introducing UIManagerDelegate 2018-04-10 12:59:51 -07:00