Stylianos Gakis
11/16/2024, 8:42 PMStylianos Gakis
11/17/2024, 1:56 AMagrosner
11/17/2024, 12:51 PMagrosner
11/17/2024, 12:52 PMagrosner
11/17/2024, 12:52 PMStylianos Gakis
11/17/2024, 2:21 PMagrosner
11/17/2024, 2:36 PMStylianos Gakis
11/17/2024, 3:16 PM:feature-x
you'd also have a :feature-x-graphql
which only serves as a shell to hold the .GraphQL files and apply the Apollo plugin etc right? That way this module also skips having to perhaps accidentally also have ksp or whatever else :feature-x
might internally use itself.
Did I understand you correctly here?agrosner
11/17/2024, 3:35 PMEduard Boloș
11/18/2024, 8:37 AMBut I tried making a build-scan for before/after moving the operations and it looks like it is ~the same before and after. Only that the apollo module now builds much quicker, but the time is simply offloaded to the others.Hmm, I am not sure what you measured in your build scan, but I think that what should be most relevant from a developer experience point of view is incremental compilation time, and less so the total build time. By that I mean which modules are more likely to be changed, and how does that affect the compilation time of other modules and of the project overall. To measure this, I use the
gradle-profiler
tool, benchmarking different scenarios, as described here.Stylianos Gakis
11/18/2024, 8:48 AM./gradlew app:assembleDebug --rerun-tasks -scan --no-configuration-cache --no-build-cache
just as a baseline so that I can get something reliable to test it against.
It's true that this module won't be touched the majority of the time, so incremental compilation will make things much better anyway in a "real" scenario.
Fwiw, I did this migration now and turning that module into a jvm only module, and looking at my scans my schema module now takes up ~20 seconds as opposed to ~50 seconds. It is no longer a bottleneck most of the time, but now the project with the most gql operations kiiinda is 😅 But that's a much better one to be slow since almost nothing depends on it.
It's a fun experience to play around with all of this, so I am trying to make sure I don't make things worse instead of better 😅Eduard Boloș
11/18/2024, 8:53 AMStylianos Gakis
11/18/2024, 9:04 AMmbonnin
11/18/2024, 9:38 AMStylianos Gakis
11/18/2024, 9:52 AMmbonnin
11/18/2024, 9:52 AMmbonnin
11/18/2024, 9:53 AMmbonnin
11/18/2024, 9:54 AMmbonnin
11/18/2024, 9:57 AMEduard Boloș
11/18/2024, 2:11 PMLocalMetricsReporter
to write the metrics to a JSON file, which we then parse and push to Honeycomb as traces, alongside all kind of metadata. Each Gradle task we "convert" to a span, so we can get a nice timeline of the tasks. Each task also has a state
property that can be one of UP_TO_DATE, IS_FROM_CACHE or EXECUTED. We have some naive logic like isIncremental = tasks.count { it.state == EXECUTED } < tasks.size / 3
, and we only care about this kind of incremental builds 😄
We only started measuring this recently, and honestly we didn't looked too much into the results yet, so there's not a lot of interesting information that I can share, but the plan is to use this metric as a Mobile DevEx KPI.