Janic Duplessis's Avatar

Janic Duplessis

@janicd.bsky.social

Software and coffee @th3rdwave.coffee

68 Followers  |  97 Following  |  6 Posts  |  Joined: 06.11.2024  |  1.4023

Latest posts by janicd.bsky.social on Bluesky


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
Preview
Only generate recursive accessibility label for accessible elements by janicduplessis Β· Pull Request #51988 Β· facebook/react-native Summary: When trying to implement e2e tests using maestro in a large app I ran into major performance issues. I tracked it down to the generation of recursive accessibility labels. The maestro iOS ...

The 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...

13.06.2025 18:55 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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.

13.06.2025 18:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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 🐒

13.06.2025 18:55 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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.

13.06.2025 18:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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 🧡

13.06.2025 18:55 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 1    πŸ“Œ 1

@janicd is following 18 prominent accounts