Performant and Reflection-Less JSON Parsing using STAG
How to improve the performance of JSON parsing in Android, and why STAG ?
This talk will cover the internal working of the infamous GSON library, and the performance bottlenecks that we hit, and how to take a Reflection-Less approach for the same.
- How GSON serializes/deserailizes objects ?
- Why is Reflection Expensive ?
- Performance Issues with Current Implementation
- What is TypeAdapter, and why to use it ?
- Introduction to STAG
- STAG in Parity with GSON
While working on the performance aspects of parsing, we came across a library STAG. The overall idea of the library was good, and with initial testing we found a good boost in parsing performance. We added a bunch of features, and contributed back to the open source community. Now, STAG is in parity with GSON, and we had ~20% improvement in parsing time, and cold boot time.
Mobile Developer @Flipkart