这就是 Native App 的性能表现
@__oQuery12 тыс. подписчиков
55 808 просмотров
41 комментарий
Комментарии из оригинального поста в X (Twitter)

@ewind_dev
并不是这样,这也是纯 JavaScript 的长列表,在 3DS 上照样 60fps 这就是 JavaScript App 的性能表现 实际上流畅 UI 跟编程语言关系很小,跟编程范式关系很大
25 отметок «Нравится»

@__oQuery
Motion
20 отметок «Нравится»

@mizorewww
只可惜这个性能得用uikit而不是swiftui,纯swiftui性能也很差
8 отметок «Нравится»

@__oQuery
不要 SwiftUI
2 отметки «Нравится»

@__oQuery
Credit @Lakr233
6 отметок «Нравится»

@leon7hao
您
3 отметки «Нравится»

@__oQuery
该收编了(
1 отметка «Нравится»

@leon7hao
🫡

@imsingee
我觉得 RN 什么达不到很正常,最离谱的是 SwiftUI 也达不到 UIKit 这种性能…… 有时候觉得声明式可能就是条弯路
3 отметки «Нравится»

@realShellWen
不知道 Jetpack Compose 能做到什么样子
2 отметки «Нравится»

@DartNativeX
Hold my beer 🍺
1 отметка «Нравится»

@__oQuery
FastList is explicitly implemented using native UITableView on iOS, not UICollectionView, nor is it virtualized using UIScrollView. The official architecture document states it directly: ListView / ListView.builder → UIScrollView + Yoga FastList → UITableView FastGrid → UICollectionView So you still used an original component bridging layer, and the App I demonstrated is also implemented using React Native, but it uses the bridging layer.

@__oQuery
Additionally, the performance of UITableView is not as good as UICollectionView.

@DartNativeX
🧵Both parts are worth separating. On the bridge: what makes React Native's bridge expensive is the thread boundary. JavaScript runs on its own thread and view operations are serialised and applied on the UI thread later, and JSI reduces that cost without removing the boundary.
1 отметка «Нравится»

@DartNativeX
DartNative has no thread hop and no serialisation. Dart runs on the platform thread and calls UIKit directly, so a cell's layout and its views are built inside the same frame.
1 отметка «Нравится»

@DartNativeX
If "bridging layer" just means "widget maps to a UIKit view", then SwiftUI has one too: its List is a UICollectionView underneath.
1 отметка «Нравится»

@DartNativeX
On UITableView versus UICollectionView: they are the same machinery, both UIScrollView subclasses with the same cell recycling, and UITableView is built on the collection view internals in recent iOS versions. The difference is the layout object.

@DartNativeX
A collection view runs a layout that computes attributes for arbitrary geometry; a table view has one fixed layout, full-width stacked rows, which is less work per cell.

@nz_64_hr
哥们你有点小丑🤡 去看看Shopify的list实现。
1 отметка «Нравится»

@aliangmvp
最近想实现照片 APP 底部的分类切换动效,始终无法复刻
1 отметка «Нравится»
















