Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
FlashList – A better list for React Native Siavash Etemadieh Staff Engineer / Core Mobile
Slide 2
Slide 2 text
2 Shopify ❤ React Native
Slide 3
Slide 3 text
Shopify Shop Inbox POS
Slide 4
Slide 4 text
Lists 4
Slide 5
Slide 5 text
5 We started with
Slide 6
Slide 6 text
Advantages ● Great API ● Optimized with Virtualization ● Works well in many cases 6
Slide 7
Slide 7 text
Cons ● Large/Complex Lists ● Low end Android experience ● CPU Intensive 7
Slide 8
Slide 8 text
Shop App with FlatList
Slide 9
Slide 9 text
9 We want everyone to enjoy Shopify
Slide 10
Slide 10 text
● maxToRenderPerBatch ● removeClippedSubviews ● updateCellsBatchingPeriod ● initialNumToRender ● windowSize 10 FlatList performance props
Slide 11
Slide 11 text
Solutions in the Community? 11
Slide 12
Slide 12 text
RecyclerListView 12
Slide 13
Slide 13 text
● It’s fast! (Recycling over Virtualisation) ● Scales with large & Complex Lists ● Highly customizable ● Mature & Well adopted Advantages 13
Slide 14
Slide 14 text
● API is complicated ● No simple solution to dynamic heights ● First render layout issues Shortcomings 14
Slide 15
Slide 15 text
⚡ FlashList 15
Slide 16
Slide 16 text
16
Slide 17
Slide 17 text
● 60/120fps fps on all devices ● Developer friendly ● Solve Dynamic Cell heights ● Instrumentation Goals 17
Slide 18
Slide 18 text
18 Developer friendly
Slide 19
Slide 19 text
19 FlashList API
Slide 20
Slide 20 text
FlashList Performance
Slide 21
Slide 21 text
How is FlashList so fast? 21
Slide 22
Slide 22 text
FlatList’s Virtualisation (10 Viewports)
Slide 23
Slide 23 text
23 FlashList (0.5 Viewports)
Slide 24
Slide 24 text
Demo
Slide 25
Slide 25 text
Photo by Vincent Camacho on Unsplash
Slide 26
Slide 26 text
26 FlashList API
Slide 27
Slide 27 text
estimatedItemSize:number 27
Slide 28
Slide 28 text
28
Slide 29
Slide 29 text
29
Slide 30
Slide 30 text
Fixing the First Render 30
Slide 31
Slide 31 text
RecyclerListView’s first render lag
Slide 32
Slide 32 text
32 FlashList’s
Slide 33
Slide 33 text
FlashList – No lag
Slide 34
Slide 34 text
Metrics ⚗ Test device: Motorola Moto G 10 (Snapdragon 460) 34
Slide 35
Slide 35 text
FlatList UI & JS FPS
Slide 36
Slide 36 text
FlashList UI & JS FPS
Slide 37
Slide 37 text
Instrumentation 37
Slide 38
Slide 38 text
38 useBenchmark() - local useBlankAreaTracker() - production
Slide 39
Slide 39 text
39 @shopify/react-native-performance @shopify/react-native-performance-lists-profiler
Slide 40
Slide 40 text
Is FlashList production ready? 40
Slide 41
Slide 41 text
Shopify Shop Inbox POS
Slide 42
Slide 42 text
What’s next? 42
Slide 43
Slide 43 text
43 New React Native Architecture (Fabric)
Slide 44
Slide 44 text
44 Masonry layout
Slide 45
Slide 45 text
🌟 https://github.com/Shopify/flash-list
Slide 46
Slide 46 text
No content
Slide 47
Slide 47 text
No content
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
49 Shopify ❤ React Native
Slide 50
Slide 50 text
Thank you!