Hey this is kind of a digression, related to the t...
# compose-wear
b
Hey this is kind of a digression, related to the topic of performance and baseline profiles. And this is probably a naive question, but I was wondering: why not compiling the whole app, ahead of time? Instead of just the "hot spots"? Which need to be collected beforehand and then packaged etc. What am I missing?
l
The JIT compiler can use information that it gets during runtime to sometimes generate code that’s faster then AOT compiled code, especially C2, where the generated code doesn’t have to work in general. Most JVMs use tiered compilation for this reason. Because of this, I would assume the JIT is the primary way of running code, with AOT there to help startup times.
b
Thanks! It's probably a bit over my head 😅. Also found this good article that explains a few things (not Android but JVM): https://www.cesarsotovalero.net/blog/aot-vs-jit-compilation-in-java.html
y
I think the android aspect is key. It's very different to the JVM and Graal story. Not sure the same choices apply.
On Android the tension of multiple apps installed from playstore, app updates becoming more frequent, subtle pervasive animations etc.
But most of all, androidx unbundled most critical code, now shipped with your app, while views are code optimised because its part of the system.
I think I remember this being a good podcast on the topic https://adbackstage.libsyn.com/episode-183-baseline-profiles
👀 1
🙏 1