跪拜 Guibai
← All articles
Uni-app · iOS · SwiftUI

uni-app x Vapor Mode Renders Twice as Fast as Native UIKit on iOS

By CHB ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A cross-platform framework that is measurably faster than native UIKit and SwiftUI on low-end hardware upends the usual performance trade-off. Teams targeting iOS can now use a single Vue codebase without accepting the typical overhead, and the open-source benchmarks are reproducible on real devices.

Summary

A new cross-platform framework from DCloud, uni-app x Vapor Mode, compiles Vue templates and styles directly into machine code or bytecode while eliminating the Virtual DOM. The result is a rendering engine that operates on the native iOS pipeline but replaces system components like UITextView and UICollectionView with custom, higher-performance alternatives. Benchmarks on a 2020 iPhone SE2 running iOS 26 show it creates and renders 4,050 views and text elements in 160.6 ms on average, against UIKit's 328.75 ms.

A separate long-list stress test loaded 4,000 rows of complex, deeply nested content with images and video. During fast scroll-back, the Vapor Mode list maintained an average 49.6 FPS while SwiftUI dropped to 37.6 FPS and frequently displayed unrendered gray blocks. The framework also remembers video playback position across scrolls, a feature the SwiftUI test implementation lacked.

The engine's rich-text component loads a 50,000-character article with 59 images instantly and scrolls without white screens. Other components—swiper, picker, slider, loading, canvas—all handle hundreds of simultaneous elements without frame drops. An Android version is in group testing and shows similar 2–3x gains over native View and Compose UI on a Huawei Mate30.

Takeaways
uni-app x Vapor Mode renders 4,050 views and text elements in 160.6 ms on an iPhone SE2, while UIKit takes 328.75 ms—a 2x speed advantage.
On a complex long list with 4,000 rows and 20,000 elements, Vapor Mode averages 49.6 FPS during fast scroll-back; SwiftUI averages 37.6 FPS and shows unrendered gray blocks.
On iOS 18 with an iPhone XR, the gap widens: Vapor Mode renders the 4,050-element test in 185.8 ms, UIKit in 339.7 ms, and SwiftUI in 610.56 ms.
Vapor Mode removes the Virtual DOM and compiles templates and styles to machine code or bytecode, while script is compiled to JavaScript on iOS.
The framework builds its own components (view, text, list, rich-text, swiper, etc.) on the native rendering pipeline instead of wrapping UIKit or SwiftUI primitives.
A rich-text component loads a 50,000-character article with 59 images with no wait and scrolls without frame drops or white screens.
Other components—picker with 4,000 records, 100 simultaneous sliders, 100 rotating loadings, hundreds of canvas balls—all run without frame drops.
An Android version in group testing shows similar results: 224 ms for the 4,050-element test vs. 436 ms for native View and 673.2 ms for Compose UI on a Huawei Mate30.
All benchmarks are reproducible; source code for both the native and uni-app x test cases is published on GitCode, and the demo app is available on the App Store.
Conclusions

Claiming a cross-platform framework is faster than native iOS rendering is an extraordinary assertion, but the benchmark methodology is transparent: reproducible source code, a low-end device, release builds, and multiple cold-start runs.

SwiftUI's poor showing—gray blocks during fast scroll and 610 ms to render 4,050 elements on iOS 18—suggests Apple's declarative framework still carries significant overhead that a third-party engine can exploit.

The decision to replace system components entirely rather than wrap them is the architectural bet that makes the speed possible; it also means the framework must re-solve accessibility, text input, and other OS-integration details that UIKit handles for free.

Vapor Mode's memory of video playback position during list recycling is a functional detail that also affects the frame-rate comparison—removing that feature would likely widen the performance gap further.

The FAQ's claim that 'AI + native UI cannot achieve higher performance than uni-app x' is a direct challenge to the assumption that AI-assisted native development will make cross-platform frameworks obsolete.

Concepts & terms
Vapor Mode
A compilation strategy in Vue 3.6 and uni-app x that removes the Virtual DOM by compiling templates and styles directly into machine code or bytecode, eliminating the diffing overhead at runtime.
Native rendering pipeline
The OS-level graphics stack (Core Animation on iOS, Skia/SurfaceFlinger on Android) that composites and displays UI elements. uni-app x builds its own components on this pipeline rather than running a separate rendering engine alongside it.
Frame callback / FPS monitoring
A method of measuring UI smoothness by tracking the system's screen refresh callbacks (every 16.6 ms at 60 Hz). If two consecutive callbacks take longer than 16.6 ms to process, a frame is dropped.
List recycling / view reuse
A technique where a scrolling list creates only enough view objects to fill the visible area and reuses them as the user scrolls, rather than creating a view for every row in the dataset. This keeps memory constant but requires fast view configuration to avoid frame drops.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗