Keeping the SDK performant is of paramount importance to us and we constantly try to improve the performance with each release. Performance includes the time taken to initialize the SDK, within how many milliseconds a method returns, the memory footprint of the SDK when the application is running, battery drainage due to background work, and so on.
SDK Initialization time
We recommend initializing the SDK on the Main Thread in the onCreate() of your Application class, hence it is important for us to keep the initialization simple and fast to ensure it does not affect the application start-up time as start-up time is important for a good user experience.
The initialization is approximately around 1-5 milliseconds on average. We have tested this on various OEMs and the results seem to be consistent.
Refer to the below table for more details
Device | Device Details | Time (in milliseconds) |
---|---|---|
Google Pixel 2 | Android 11 4 GB RAM |
0.878593 |
Samsung A51 | Android 10 6 GB RAM |
1.95223 |
One Plus 7 | Android 10 6 GB RAM |
0.365365 |
Mi Y9 | Android 9 4 GB RAM |
2.658177 |
Vivo Y51A | Android 7 3 GB RAM |
1.667916 |
Pixel 4a | Android 12 6 GB RAM |
0.446823 |
Tab A7 |
Andriod 11 3 GB RAM |
0.889791 |
Mi K20 Pro |
Android 10 6 GB RAM |
0.553854 |