- TTI (time to interact): This is the time taken to launch applications to the moment they load completely.
- The size of the downloads.
- Utilization of memory.
Recommended for you: React Native vs Flutter vs PWA: Battle of Trending Mobile App Frameworks.
- A tiny size of Android APK making it possible to install a Facebook app or any other apps on devices with less memory.
- Bytecode may get mapped by memory and get loaded from flash memory increasingly as required.
- The virtual address area is assigned in chunks whenever it is required. This prevents the need to determine the size of the heap and it also minimizes overhead.
How to get Hermes
But React Native has a few drawbacks which are why most people do not like it. For instance: Online gaming apps and other Android apps functions need native code like when they need to back up the integration between the camera and the sensor. Also, Android developers always need to design bridges in order to plug the spaces between the structure and native code. This was also the reason why Airbnb decided to quit it.
The limitations of mobile gadgets for instance slow flash and small RAM amount made Facebook make some architectural decisions. Below are the things they implemented:
1. Byte code pre-compilation
Optimizing the whole program can take place. This includes de-duplication of operation and packing the string table.
The byte code is built in a manner that during runtime, will get mapped on memory and be interpreted without requiring to go through the whole file. The flash memory improves latency on most medium and poor-quality mobile gadgets. So this loads byte code from the flash when necessary and the optimization of byte code for size brings great TTI enhancements.
Additionally, since memory is mapped only read and supported by a file, the OS which does not swap may still remove those pages under memory pressure. This will minimize the out of memory process kills in gadgets that have less memory.
2. No JIT
3. Waste collecting technique
Good memory usage is crucial in Android mobile gadgets. Low-quality gadgets have less memory, the swapping of operating systems is not possible and the OS kills apps that utilize a lot of memory space. Upon killing applications, slow restarting is needed and the functioning of the background is affected.
During the initial Facebook Android tests, it was found out that the virtual address space may be limited in big apps on the 32-bit gadgets.
To reduce memory and virtual address space utilized by the engine, Facebook designed a waste collector with the features below.
- Allocating on demand: Virtual address space is assigned in chunks when necessary.
- Noncontiguous: Virtual address space should be in one memory range to eliminate resource limits.
- Moving: Moving objects implies that memory may get fragmented while unnecessary lumps are taken back to an OS.
You may also like: Angular vs React: Which Framework to Choose in 2019.
Disclosure: Some of our articles may contain affiliate links; this means each time you make a purchase, we get a small commission. However, the input we produce is reliable; we always handpick and review all information before publishing it on our website. We can ensure you will always get genuine as well as valuable knowledge and resources.