SwiftUI Performance for Demanding Apps by Aviel Gross - SwiftLeeds 2023

  Переглядів 3,121

SwiftLeeds

SwiftLeeds

5 місяців тому

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 Місяць тому
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 Місяць тому
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 Місяць тому
@@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 3 місяці тому
Very good and informative speech. Thanks a bunch.
@jmod1716
@jmod1716 3 місяці тому
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 3 місяці тому
Glad it was helpful!
ICYMI: Enums Are... by Jessie Linden - SwiftLeeds 2023
27:07
SwiftLeeds
Переглядів 1,3 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,7 млн
Ах Ты Ж Су... Не Провоцируй Меня! @NutshellAnimations
00:15
Глеб Рандалайнен
Переглядів 1,3 млн
🔥 Україна виходить у ФІНАЛ ЄВРОБАЧЕННЯ-2024! Реакція alyona alyona та Jerry Heil #eurovision2024
00:10
Євробачення Україна | Eurovision Ukraine official
Переглядів 125 тис.
skibidi toilet 73 (part 2)
04:15
DaFuq!?Boom!
Переглядів 27 млн
DC iOS: SwiftUI Architecture and Best Practices
1:15:19
Dev Community
Переглядів 16 тис.
SwiftConf 2023 - Paul Hudson: Level up your SwiftUI
43:16
SwiftConf
Переглядів 8 тис.
3 MISTAKES to avoid when using Async / Await in Swift 😌
4:41
Vincent Pradeilles
Переглядів 9 тис.
The ARM chip race is getting wild… Apple M4 unveiled
4:07
Fireship
Переглядів 221 тис.
Introducing Vortex: High-performance particle effects for SwiftUI
6:16
NavigationStack - SwiftUI Programmatic Navigation - iOS 16
20:20
Sean Allen
Переглядів 62 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,7 млн