Summary:
I've had my eyes on this optimization for a while: during TTRC especially, but really during any heavy render path, Fabric will create hundreds to thousands of MountItem class instances in order to construct a BatchMountItem.
This results in: hundreds/thousands of round-trip JNI calls, hundreds/thousands of Object allocations, etc. This will also result in increased memory and GC pressure.
Theoretically, by reducing the number of JNI calls and reducing allocations, we may be able to get some small wins in memory and CPU usage during very hot paths.
I am motivated to do this, in part, to indirectly measure the cost of JNI calls as well as allocating many objects vs an int buffer. I am unaware of such a measurement that we can use to make architectural decisions for React Native Android overall.
The other reason this could be a positive change: if it's successful and we can delete the old path, we'll be able to delete a bunch of Java classes entirely which is great for APK size wins.
Changelog: [Internal]
Reviewed By: shergin
Differential Revision: D24631230
fbshipit-source-id: 86a46ffcaef4ecbec2e608ed226aed0b5c4b832e
Summary:
This diff annotates core classes of Fabric with NonNull and Nullable annotations, this will help analysis of nullability plus improving integration with Kotlin clients
Changelog: Add NonNull annotation to Fabric core classes
Reviewed By: shergin
Differential Revision: D18010918
fbshipit-source-id: 40fe68470b97cdf740f52dfeb9130465aab5e6df
Summary: This diff makes the Video component compatible with Fabric on Android.
Reviewed By: JoshuaGross
Differential Revision: D17450815
fbshipit-source-id: 5e47d8cdca96f9fbe72902bac7dd157f7b5fdb1a
Summary:
This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time.
```arc f --paths-cmd 'hg files -I "**/*.java"'```
drop-conflicts
Reviewed By: cpojer
Differential Revision: D16071725
fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
Summary:
Easy diff to refactor the sComponentNames map out of the FabricUIManager class.
This is a necessary clean-up to perform a slightly major refactor of the Fabric classes
Reviewed By: JoshuaGross
Differential Revision: D15421769
fbshipit-source-id: 3be73a6e20b338c8cea23ef0c88db417df7e3aa9