Use mapbuffer for ReactViewGroup

Summary:
Provides an alternative way of diffing props on Android side. Instead of passing dynamic JSON values from JS, the new approach diff C++ props and serializes difference into a `MapBuffer`. Current implementation does this only for `RCTView` component to test performance, correctness and memory impact (as MapBuffers are supposed to be more compact and performant).

This way of passing props allows for additional alignment between platforms, as C++ props are now source of truth for the view state, similar to iOS. At the same time, changing serialization method requires reimplementing `ViewManager` codegen (done manually for now) to account for `MapBuffer`s.

Changelog: [Added][Android] - Added an experimental prop serialization path based on MapBuffer

Reviewed By: mdvacca

Differential Revision: D33735245

fbshipit-source-id: 1515b5fe92f6557ae55abe215ce48277c83974a6
This commit is contained in:
Andrei Shikov
2022-02-22 12:23:49 -08:00
committed by Facebook GitHub Bot
parent b1a779392d
commit cbcdaae2b5
14 changed files with 777 additions and 68 deletions
@@ -704,7 +704,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
int rootTag,
int reactTag,
final String componentName,
@Nullable ReadableMap props,
@Nullable Object props,
@Nullable Object stateWrapper,
@Nullable Object eventEmitterWrapper,
boolean isLayoutable) {