@shikasd also made a very interesting thread regarding this with a âunreasonable amount of lambda triviaâ as he warned đ If you like this article youâll probably be interested in this thread too.
We also had a discussion regarding one of the tips which suggests to use reference lambdas on your non-stable types (like viewmodel in the example) as opposed to a normal lambda at the end of the thread mentioned above. With one question not yet answered, but hopefully someone else can chime in with an answer sometime đ
h
harry248
08/08/2022, 11:12 AM
@Johnny@Artur Schwarz fyi
harry248
08/08/2022, 12:20 PM
@Stylianos Gakis A good thread, thanks. I would actually be interested in what expectations the Compose team has here. Do they take it for granted that developers are aware of these things? Or do they assume that it is often implemented not optimally, but don't see a problem with that because the negative impact isn't big enough.
s
Stylianos Gakis
08/08/2022, 12:22 PM
I think the idea is that as long it's not a correctness bug then it's mostly okay, and this is not a correctness bug, just a potential perf one. Things will get more performant as time goes anyway. From that point it's a matter of using the app and measuring performance and only in the case where there's a real perf issue you can delve down to these details.
That's what I've understood at least from all the discussions here and in general.
h
harry248
08/08/2022, 12:27 PM
I'm not very familiar with the debates on this topic. Are these things that are being worked on so that sooner or later you won't have to make these optimizations yourself?
s
Stylianos Gakis
08/08/2022, 12:33 PM
One example thread here https://twitter.com/objcode/status/1379954263837712388?s=20&t=uCK5p0UlnPWB2x60DrUCIQ .
I doubt that these optimizations will become 100% redundant and that everything will just magically be generating the absolute most performant code every time. In the cases where one needs the performance I think that weâll still need to take these extra steps to go with the âperformantâ approach.