apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.75k stars 652 forks source link

Run cache benchmarks on iOS – equivalent to existing Android benchmarks #4365

Open sebj opened 2 years ago

sebj commented 2 years ago

Use case

We're using Apollo Kotlin in a Multiplatform project targeting both Android and iOS. For a long time, we've been seeing slower cache read durations on iOS compared to Android, sometimes 2x to 3x worse, even with the latest release at time of writing (3.5.0) with latest Kotlin (1.7.10) and the new memory model. This is something I've discussed in the Kotlin Slack a fair bit, which influenced the addition of the Android cache benchmarks in #4229 (the calendar benchmark comes directly from our schema/data).

Describe the solution you'd like

It would be very useful if the existing cache benchmarks also ran against an equivalent iOS app, with the results visible in the existing dashboards.

This would help our team to quickly and easily understand if there could be issues with our Apollo setup, and perhaps might help the community and the Apollo team to understand (and address if necessary) Apollo's performance on iOS.

As Apollo Kotlin supports Multiplatform projects, it also seems likely to me that a high proportion of Multiplatform users are targeting both iOS and Android, and could benefit from visibility into this.

Thanks!

martinbonnin commented 2 years ago

Linking a promising Gradle plugin for iOS benchmark. Haven't looked too much into it yet but that could be useful

https://android-review.googlesource.com/c/platform/frameworks/support/+/2230043