Try it out if youβre using Maestro with a large RN app on iOS. Curious to hear if it speeds things up for you too.
13.06.2025 18:55 β π 1 π 0 π¬ 1 π 0@janicd.bsky.social
Software and coffee @th3rdwave.coffee
Try it out if youβre using Maestro with a large RN app on iOS. Curious to hear if it speeds things up for you too.
13.06.2025 18:55 β π 1 π 0 π¬ 1 π 0The fix? Only generate recursive accessibility labels for views with accessible={true}, the ones that are used for accessibility features like VoiceOver.
Hereβs the PR: github.com/facebook/rea...
RN apps often have deep, complex hierarchies, which makes this way worse. The new architecture helps (thanks to view flattening), but the root issue is still there.
Maestro suggests migrating to the new arch, but the real bottleneck is this accessibility label generation logic.
The problem? Maestro queries the whole view hierarchy accessibility labels, which are generated recursively.
When it queries the root view of your app, RN will recurse through every single view and concatenate every bit of text. This then repeats for each view.
In our case it would take 30 secs π’
Maestro constantly inspects the view hierarchy using Appleβs snapshotting APIs to get things like position, text, accessibility labels...
RN has a feature that generates accessibility labels by recursively combining text from children, useful when you donβt pass it as a prop.
Sped up iOS e2e test runs with Maestro by ~4x in the Rainbow app π₯
The improvement was actually in React Native core. Hereβs what was happening, and how it was fixed π§΅