How we lowered Fullstory for Android’s impact on app startup time by 75% thanks to Emerge Tools
Article Summary
Fullstory got a wake-up call when a prospect flagged a 6% startup time increase from their Android SDK. Even when disabled, the SDK was adding 100ms to app launches.
Engineering Manager Prashanth Sadasivan shares how his team used Emerge Tools' performance analysis to identify and fix a hidden bottleneck. What started as customer feedback turned into a masterclass in mobile performance optimization.
Key Takeaways
- Culprit: ClassLoader.getResourceAsStream was silently killing startup performance
- First fix: Moved config to Android assets, cut initialization by 50%
- Second optimization: Deferred metadata parsing off the main thread
- Final result: 75% faster SDK initialization in their sample app
By switching from ClassLoader.getResourceAsStream to Android assets and deferring non-critical parsing, Fullstory reduced their SDK's app startup impact by 75%.
About This Article
Fullstory's Android SDK was taking about 270ms to initialize. The slowdown came from ClassLoader.getResourceAsStream being called in ContextWrapper#attachBaseContext, which added unnecessary overhead just to read a simple file.
Prashanth Sadasivan's team moved the configuration file to Android's assets directory and split it into two files. They deferred metadata parsing to happen off the main thread after the session was confirmed.
SDK initialization dropped from 270ms to 67ms, cutting the app startup impact by 75%. The deferred metadata parsing stayed off the main thread, so users didn't experience any delays.