跳过导航
这就是 Native App 的性能表现
0:00 / 0:22

这就是 Native App 的性能表现

拾一

@__oQuery1.2万 位关注者

在 X 上查看
161 个赞下载原帖

55,808 次观看

这就是 Native App 的性能表现 如果你不使用 UIKit 去编写,而使用 React Native 传统的 FlashList 等其他的非原生 List,将不会达到这样的效果吧?

41 条评论

评论来自 X (Twitter) 上的原帖

  • Yifeng "Evan" Wang 的头像

    @ewind_dev

    并不是这样,这也是纯 JavaScript 的长列表,在 3DS 上照样 60fps 这就是 JavaScript App 的性能表现 实际上流畅 UI 跟编程语言关系很小,跟编程范式关系很大

    25 个赞

  • 拾一.max-fast 的头像

    @__oQuery

    Motion

    20 个赞

  • 雨夹雪❄️ 的头像

    @mizorewww

    只可惜这个性能得用uikit而不是swiftui,纯swiftui性能也很差

    8 个赞

  • 拾一.max-fast 的头像

    @__oQuery

    不要 SwiftUI

    2 个赞

  • 拾一.max-fast 的头像

    @__oQuery

    Credit @Lakr233

    6 个赞

  • leon7hao 的头像

    @leon7hao

    您

    3 个赞

  • 拾一.max-fast 的头像

    @__oQuery

    该收编了(

    1 个赞

  • leon7hao 的头像

    @leon7hao

    🫡

  • Bryan 的头像

    @imsingee

    我觉得 RN 什么达不到很正常,最离谱的是 SwiftUI 也达不到 UIKit 这种性能…… 有时候觉得声明式可能就是条弯路

    3 个赞

  • ShellWen | 颉文 ⚝➡️PyCon 的头像

    @realShellWen

    不知道 Jetpack Compose 能做到什么样子

    2 个赞

  • DartNative 的头像

    @DartNativeX

    Hold my beer 🍺

    1 个赞

  • 拾一.max-fast 的头像

    @__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.

  • 拾一.max-fast 的头像

    @__oQuery

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

  • DartNative 的头像

    @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 个赞

  • DartNative 的头像

    @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 个赞

  • DartNative 的头像

    @DartNativeX

    If "bridging layer" just means "widget maps to a UIKit view", then SwiftUI has one too: its List is a UICollectionView underneath.

    1 个赞

  • DartNative 的头像

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

  • DartNative 的头像

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

  • Nintendo🇺🇦🇳🇿 的头像

    @nz_64_hr

    哥们你有点小丑🤡 去看看Shopify的list实现。

    1 个赞

  • aliang 的头像

    @aliangmvp

    最近想实现照片 APP 底部的分类切换动效,始终无法复刻

    1 个赞