Notion on Android is now more than twice as fast to launch

Karn Saheb
11 min readintermediate
--
View Original

Overview

Notion has significantly improved the launch speed of its Android app, making it more than twice as fast compared to the beginning of 2023. This article details the steps taken to enhance performance, including migrating from web to native code, identifying performance bottlenecks, and implementing various optimizations.

What You'll Learn

1

How to leverage native code to improve app performance

2

Why profiling is essential for identifying performance bottlenecks

3

How to implement caching strategies to enhance startup speed

Prerequisites & Requirements

  • Understanding of mobile app architecture and performance metrics
  • Familiarity with Android Studio and profiling tools(optional)

Key Questions Answered

How did Notion improve the launch speed of its Android app?
Notion improved the launch speed of its Android app by migrating from a web-based architecture to native code, which allowed better performance optimization. They also identified and addressed performance bottlenecks through profiling and implemented caching strategies, resulting in a launch speed that is now more than twice as fast as it was at the beginning of 2023.
What specific performance metrics were improved in the Notion app?
The Notion app achieved a 3x improvement in perceived app startup speed with the introduction of the native Home Tab, and the native Search Tab improved loading time by more than 80 percent. Overall, there was a ~45 percent speedup in the P95 Initial Home Render metric by the end of the year.
What strategies did Notion use to identify performance bottlenecks?
Notion used metrics like 'initial_home_render' sampled from production app sessions to identify slow segments during app startup. They focused on the 95th percentile of data to understand the experience of most users and employed detailed profiling techniques to analyze code execution and identify specific areas for improvement.

Key Statistics & Figures

App launch speed improvement
More than twice as fast
Compared to the beginning of 2023
Perceived app startup improvement with native Home Tab
3x improvement
Measured in user experience
Loading time improvement with native Search Tab
More than 80 percent
Measured during early 2023
Speedup in P95 Initial Home Render
~45 percent
By the end of the year

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Mobile
Android
Platform for the Notion app
Database
Sqlite
Used to store Block data for the app
Dependency Injection
Dagger
Used for managing dependencies in the app
Frontend
Jetpack Compose
Framework used for building the UI of the Notion app

Key Actionable Insights

1
Implement caching strategies to reduce app startup time by deferring non-essential initializations.
By caching user session data and experiment configurations, Notion was able to significantly improve the perceived performance of their app. This approach can be applied in similar contexts where startup speed is critical.
2
Utilize profiling tools to identify and address performance bottlenecks in your application.
Profiling allows developers to visualize where time is spent during app startup, enabling targeted optimizations. Regular profiling can help maintain performance as new features are added.
3
Migrate from web-based architectures to native code for performance-sensitive applications.
Notion's transition to native code allowed them to leverage the full capabilities of the Android OS, resulting in substantial performance gains. This strategy is particularly beneficial for applications requiring high interactivity.

Common Pitfalls

1
Failing to profile applications regularly can lead to unnoticed performance degradation over time.
Without regular profiling, developers may miss critical performance issues that arise as new features are added, leading to a poor user experience.
2
Overloading the main thread with heavy operations can cause UI jank and slow app responsiveness.
It's crucial to offload long-running tasks to background threads to maintain a smooth user interface and ensure quick response times.

Related Concepts

Mobile App Performance Optimization
Caching Strategies
Native Vs. Web App Architecture
Profiling And Performance Measurement Techniques