The conversation around the automatic optimization feature for app installations on Android, as discussed on tchncs.de, underscores the tension between technological advancement and privacy concerns. It's enlightening to see such a nuanced discussion, focusing on how these features, while aimed at enhancing user experience, also raise important questions about user consent and data security. y9
AssholeDesign
This is a community for designs specifically crafted to make the experience worse for the user. This can be due to greed, apathy, laziness or just downright scumbaggery.
holy shit what kind of sneaky bot is this?!
linking "free games" at the end of a string of random buzzwords?
Yup... I've removed tons of them.
It's almost always a different garbage link, usually a tangentially related comment written by some GPT with a bs link slipped in there.
They're mostly single use accounts too.
Report them when you see them.
Thanks
Nobody here seems to understand the real technical purpose of this feature, so let me try to explain what's really happening.
Android applications and much of the system are written in Java. In the beginning, this decision was made because it provides portability at least in theory and the language was familiar to developers, but this decision wasn't without its disadvantages. This extra layer of the Java virtual machine led to laggy user experiences and increased memory use in the very first versions of Android.
The first attempt to fix this problem was the Dalvik runtime. This first solution incorporates a tracing style just in time compiler that translates Java into native code as it runs. An Android Kitkat, ART or Android runtime was introduced as a developer option and later became the default which offers full compilation to native code at install time. This led to a really long system update process and some complex apps took forever to install, so in Nougat Android moved to a hybrid design that only pre-compiles the most important parts of the application. This saves install time and system update time while still getting good performance by pre-compiling to native, and we fall back to JIT if unexpected code becomes a performance bottleneck when the user is actually using the app.
But which parts do we pre-compile? How do you know what code actually matters to the user experience?
This dialogue in Play is about sharing runtime information about which code was actually executed. Google aggregates this information so that when users install an app they also receive a file describing which parts are most commonly used and actually matter to performance so the system can focus on pre-compiling only this specific subset. Namely, this data is which classes and methods are expected to be hot, with special attention paid to the ones required to initialize the application.
From a technical perspective, I don't really see how this places private user information at risk, and I agree that it needs to be the default for this design to work because most users aren't savvy enough to understand what it actually does. Google tried to simplify it is much as possible in this dialogue, but it's led to a lot of confusion especially for more technical users.
The detailed breakdown is appreciated.
Silly question, I'm a software dev but not as mobile dev so could be barking up the wrong tree here. Could Google play not cache precompiled versions for the most popular architectures and just download them precompiled? Sure some rarer configurations would still need to do the slower local process but the more popular configurations representing the vast majority of systems would be covered.
It's not impossible, but there are limitations to that alternative approach. For example, ARM processors are really heterogeneous with respect to exactly which extensions are supported. If you compile on the server, you might not be able to take advantage of features that only exist on a few phones like the latest flagships. It also requires the device to trust that the pre-compiled code is actually consistent and won't cause bad memory access for example that can lead to a crash. If the device compiles the code, it knows there's a true one-to-one correspondence with the actual Java byte code, closing an opportunity for inconsistency. The device knows the size of the CPU caches and might make different instruction scheduling decisions in the actual binary. Generally, it's easier to be more efficient when you have all the information about the target processor available on device. But, you could have done it a different way that's true. Google decided not to do that.
We should also think about what's to be gained by moving it all to the server? On the server, you still don't know the actual user patterns. It's not space efficient to compile the entire application even if the compile time is free on the server. You would have to download unnecessary native code that may only be used by an extremely small fraction of users, wasting storage space on user devices. What if I don't use that whole area in the application? What if most users don't use it? Why should we have to download an optimized version of it onto every device? Perhaps, the best optimization is to not ship any native code for the feature nobody uses.
If you want the best balance of high performance on the user device while not wasting extra space for binary code that isn't frequently used, I think this design makes more sense. You're never getting away from having a full compiler on every device because Google can't assume that you aren't using other app stores, and it's perfectly valid for Android apps to generate code dynamically at runtime that can never be compiled in advance.
I want to appreciate the effort you put in this response. Respect, dear sir.
Seems like a cool idea but it would be good if it was opt-in and done by not-google
If they do that people won't turn it on. They rely on people to not read things.
I wish someone (EU) would step in and force companies to make data collection settings be opt in rather than opt out.