stackotter @stackotter.dev · May 6

SwiftCrossUI's AndroidBackend has been hanging for a few hundred milliseconds after each view update, so Beberka collected a flame graph to investigate. It turns out, Android's RelativeLayout view measures each child twice per measurement pass, leading to exponential time complexity when nested!

1 likes 2 replies

?

Replies

stackotter · May 6

Switching to a custom ViewGroup implementation brought the offending measurement pass from ~400ms down to ~7ms; github.com/moreSwift/sw...

Khan Winter · May 6

Woah nice fix