automotive-design-compose
automotive-design-compose copied to clipboard
Convert the Layout crate and JNI to use Protobuf
Snapshot diff report vs base branch: main Last updated: Thu May 23 14:24:11 PDT 2024, Sha: ae77719b3977953015ce8c7c35b12916fed2ed9f No differences detected
Does the squoosh config run the same as before? (I saw that you made some changes to LayoutManager; squoosh uses the LayoutParentChildren type to get the tree communicated, rather than the subscribe/unsubscribe methods).
The Validation test passes and there's no changes in screenshots, if that's what you mean.
On Mon, May 20, 2024 at 7:41 PM Ralph Thomas @.***> wrote:
Does the squoosh config run the same as before? (I saw that you made some changes to LayoutManager; squoosh uses the LayoutParentChildren type to get the tree communicated, rather than the subscribe/unsubscribe methods).
— Reply to this email directly, view it on GitHub https://github.com/google/automotive-design-compose/pull/1119#issuecomment-2121490239, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMM2SRBUMDPVQAJABKPP7LZDKJ5BAVCNFSM6AAAAABH2VSBWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRGQ4TAMRTHE . You are receiving this because you were assigned.Message ID: @.***>
-- Tim Froehlich Test Engineer for DesignCompose and AAOS Located in Austin TX, US Central Time I support a free Palestine 🇵🇸 - go/open-letter
@rylin8 I've not tried to measure performance of this change. If @iamralpht wants me to then I absolutely can, it'll just take more time. Do you have any benchmarking tests written for the rust code?
It's definitely less efficient to go serdeclass -> protoclass -> serialize... etc. I chose that for this change because this change is only a partial conversion of our structures that are serialized. I'll look back into whether we want to stay with wrapping the classes or just replace the Rust-native classes with the protobuf-generated classes when I finish the proto files for all of serializedDesignDoc.
It's definitely less efficient to go serdeclass -> protoclass -> serialize... etc. I chose that for this change because this change is only a partial conversion of our structures that are serialized. I'll look back into whether we want to stay with wrapping the classes or just replace the Rust-native classes with the protobuf-generated classes when I finish the proto files for all of serializedDesignDoc.
If you want some numbers, even spitball comparisons, you can instrument this one function in Squoosh: https://github.com/google/automotive-design-compose/blob/main/designcompose/src/main/java/com/android/designcompose/squoosh/SquooshLayout.kt#L52
That includes the serialize, deserialize, and layout algo runtime over the whole tree. In the traditional DC implementation it's a bit harder to capture all the phases because the callsites are spread out (like serialize is in with subscribe which is called during composition, for example).