r/mobiledev • • 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

4 comments sorted by

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/Turbulent-Lead26 1d ago

this is a much better way to approach it especially when you're testing changes across multiple builds uxcam since having proper session replays and user journey insights makes it easier to understand whats actually happening instead of spending hours digging through devtools being able to compare timelines spot unexpected behaviour and identify where things break can save alot of time

1

u/Sea_Dealer133 1d ago

didn't know you could export those summaries thats going straight into our ci

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 --profile plus DevTools, or adb shell dumpsys gfxinfo <package> framestats for 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.