HOW 40 LINES OF CODE SPED UP IOS END-TO-END TESTS BY OVER 50%
Wealthfront improved its iOS end-to-end test suite performance by over 50% with a 40-line code change. It identified that the default XCTWaiter polling mechanism caused bottlenecks due to its fixed 1-second interval between checks. Initially, its team sped things up by implementing a custom waiter with a shorter polling interval of 0.1 seconds, but this overwhelmed its CI machines. They fixed this by implementing exponential backoff for the polling interval to adapt to CPU load.