Fullstory Jun 27, 2023

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

Critical Insight

By switching from ClassLoader.getResourceAsStream to Android assets and deferring non-critical parsing, Fullstory reduced their SDK's app startup impact by 75%.

The post includes a detailed breakdown of their testing methodology and why raw performance numbers can be misleading across different app environments.

About This Article

Problem

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.

Solution

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.

Impact

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.

Related Articles