SwiftUI Performance for Demanding Apps by Aviel Gross - SwiftLeeds 2023

  Рет қаралды 3,682

SwiftLeeds

SwiftLeeds

8 ай бұрын

SwiftUI is powerful and flexible, but sometimes confusing. Things like modifiers order, inline views, body complexity, and POD views, can all seriously affect our performance. In this talk, we will learn the best ways to use SwiftUI for resource-heavy and dynamic UIs, while maintaining the golden 60fps.
In 2022, we (Adobe Bēhance) rebuilt our navigation infra, and our main Feed, in SwiftUI. We also insisted the app must run great on the worst phone we support - iPhone 6S Plus. Getting there was a journey. We will start by comparing SwiftUI to UIKit: We know there’s no more View Controller, and views are mere “function of their state”, but what does it mean? Next, we will dive into specific scenarios and see how this new way of thinking is critical for achieving great performance. We will learn things like:
• Avoiding redundant view diffing.
• Controlling view update lifecycle.
• How to “hide” complex state to improve performance.
• Avoiding SwiftUI’s pitfalls, like nested publishers and environment memory leaks.
• And more…

Пікірлер: 7
@IV_Land
@IV_Land 3 ай бұрын
That's highly cool, thanks a lot for the speech. A quick note about "_isPOD(T.self)". In Swift, the String type is called a value type but only has a value semantic. Under the hood, the String type uses a copy-on-write mechanism. So like closures and other ref. type, Strings are also ref. types under the hood. According to this - structs with Strings parameters, that pass from outside or stored directly - are Not POD. To check this you can call _isPOD(T.self) for such struct, and the return value will be - false, while the structs with only POD parameters, such as Int, Float, etc. will return - true.
@avielgross
@avielgross 3 ай бұрын
That's a good call! I actually fixed that in the recent iteration of this talk I just gave at AppDevCon in March! :)
@IV_Land
@IV_Land 3 ай бұрын
@@avielgross Once again, thanks a lot! Too bad I only found a link to the page with info about your session, without any record(
@volovely1990
@volovely1990 6 ай бұрын
Very good and informative speech. Thanks a bunch.
@jmod1716
@jmod1716 6 ай бұрын
Thanks for this - insanely informative and beneficial 🤝 I’ve been struggling over SUI performance and wrapping my head around how it diffs and this explained everything so well
@swiftleeds
@swiftleeds 6 ай бұрын
Glad it was helpful!
ICYMI: Enums Are... by Jessie Linden - SwiftLeeds 2023
27:07
SwiftLeeds
Рет қаралды 1,4 М.
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 9 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 28 МЛН
Илья Чикмарев - Performance в SwiftUI
31:05
CocoaHeads
Рет қаралды 2,8 М.
I Spent 120 Hours Coding This!
24:01
Hallden
Рет қаралды 106 М.
iOS at Staff+ by Joel Kin - SwiftLeeds 2023
30:17
SwiftLeeds
Рет қаралды 1,1 М.
Build a Binary by Anna Beltrami - SwiftLeeds 2023
40:51
SwiftLeeds
Рет қаралды 671
SwiftConf 2023 - Paul Hudson: Level up your SwiftUI
43:16
SwiftConf
Рет қаралды 10 М.
SwiftUI Alerts - Buttons, TextFields, & Passing Errors
13:18
Sean Allen
Рет қаралды 4,8 М.