Clips from 158 2
Quick Overview
The discussion centers on the challenges of Flutter development, particularly concerning the need for Dart's ahead-of-time (AOT) compilation for performance, which clashes with platform-specific rules like Apple's restriction on writing memory pages, necessitating the use of the slower Dart interpreter on iOS, despite the existence of highly optimized interpreters like Hermes.
Key Points: The goal for the company (Shortbird) was to build a piece of technology that fit into Google's puzzle, based on Flutter and Dart technologies. A significant challenge was overcoming the lack of immediate, over-the-air (OTA) updates on iOS, which is standard practice for web apps like TikTok or YouTube, requiring a new app store submission for every change. The team built their own Continuous Integration (CI) system because existing solutions were insufficient for their needs, as evidenced by a Stack Overflow survey showing one-third of Flutter apps submitted the previous year were Flutter apps. The Dart interpreter, which is necessary for AOT compilation limitations (like Apple's inability to write to memory pages), is inherently slower than AOT-compiled code, creating a performance bottleneck on iOS. Hermes, an interpreter used by other large apps, is highly optimized, but Flutter developers are currently restricted to using the slower Dart interpreter on iOS for updates. The effort to make the Dart interpreter fast enough for production on iOS took about a month for the Android version and two to three months for the iOS version, suggesting complexity in overcoming platform restrictions.
Context: This conversation features two developers discussing the technical hurdles and engineering decisions involved in developing cross-platform applications using Google's Flutter framework, specifically focusing on the differences in deployment and performance characteristics between Android and iOS, especially concerning code updates and execution environments.
Detailed Analysis
The conversation begins with the first speaker asking about the goal of the company, Shortbird, concerning its North Star, which is rooted in Flutter technology. The second speaker explains that their goal was to build something that fit into Google's puzzle, leveraging Flutter and Dart. A major pain point discussed is the inability to perform seamless OTA updates on iOS, unlike web platforms such as TikTok or YouTube, which forces developers to go through the entire app store review process for every small update. To address their needs, they built their own CI system because existing solutions were inadequate, citing a survey indicating one-third of Flutter apps submitted annually were Flutter apps. The fundamental technical difficulty lies in Dart's reliance on AOT compilation for performance, which conflicts with iOS restrictions preventing apps from writing to memory pages, thereby forcing the use of the slower Dart interpreter on iOS devices. While other large apps use highly optimized interpreters like Hermes, the Flutter ecosystem is currently constrained by the slower Dart interpreter for updates. The engineering effort to achieve acceptable performance on iOS took about a month for the Android version and two to three months for the iOS version, indicating the difficulty in making the interpreter fast enough to avoid runtime performance issues, such as slow execution of code segments that would normally be compiled. The speaker notes that while Dart has an interpreter, Apple's rules restrict writing to executable memory, forcing this reliance on interpretation, which results in slower performance compared to AOT compilation or highly optimized interpreters like Hermes.