r/mobiledev • u/QueasyFan9497 • 1d ago
adding mobile analytics without impacting app performance in flutter, how do you measure it ?
Our flutter app already pulls in a few third party SDKs and we're seeing jank on mid range android phones so I'm hesitant to add anything else that might hurt frame times I'd like mobile analytics without impacting app performance, or at least without a noticeable hit but vendor claims about lightweight background capture only tell me so much if you've added an analytics SDK to a flutter app that already had performance issues, how did you measure the before and after ?
11
Upvotes
1
u/ComfortableMurky8447 1d ago
integration test with trace action is nice for this you get timeline summaries you can diff between builds instead of eyeballing devtools
1
u/MobileXapps 1d ago
Measure it the boring way: build two release builds that are identical except for the SDK, run the same scripted flow on the same mid-range Android (an integration_test driving the scroll-heavy screens works), and capture frame timings with
flutter run --profileplus DevTools, oradb shell dumpsys gfxinfo <package> framestatsfor raw numbers. Compare p90/p99 frame build and raster times, not averages, because jank lives in the tail.Also check startup separately. A lot of analytics SDKs do their work in Application.onCreate or on first frame, so cold start time is often where they hurt more than scrolling. Run each build 10 times from a killed state and compare.
While you're in there, profile the SDKs you already have. Often one of them is the real culprit, and if you replace it the new analytics SDK fits in the budget you freed.