SwiftData Background Tasks: Massively Improve Your Apps Performance | SwiftData Tutorial | #12

preview_player
Показать описание
SwiftData Background Tasks: Massively Improve Your Apps Performance

**********************************

*Timestamps:*

00:00 - Intro
00:23 - Project Intro
00:43 - Performance Issues On Main Thread
04:15 - Using @ModelActor In SwiftData
06:52 - Saving Data In SwiftData Background Thread

**********************************

In this SwiftData tutorial, we're going to look at how we can improve our apps performance by using SwiftData Background Tasks. We'll look at how we can use background threads in SwiftData to help us handle saving large amounts of data without affecting our apps performance.

We'll also look at how we can use Xcode Instruments to validate and make sure that the data that we've saving is being done on a thread that isn't the Main Thread to avoid performance issues.

**********************************

*Check Out My Courses 👨🏽‍🏫*

Enjoy my teaching style? Check out my other courses on my website that may interest you, they range from beginner to advanced topics within iOS development.

*Link to Website*

**********************************

*Join the crew 🤝*

Want to help support the channel? Become a member with the join link below and get access to exclusive badges and stickers, as well as other perks that are coming soon.

*Become a channel member*

*Support in other ways 💕*

You can support me for free and help the channel grow so that I can continue to make the best iOS development content for you by liking, commenting, subscribing, and hitting the notification bell.

All of this really helps my channel grow and allows me to keep on making content for you. If you’re interested in subscribing to the channel then you can do so with the link below.

*Subscribe to the tundsdev YouTube channel*

**********************************

*Download Source Code*

Interested in looking at the source code? Then check out the GitHub Repo below

[GITHUB REPO HERE]

**********************************

EditorKeys
View Editor Keys Amazing Products with the link below and use the discount code for 10% off any product

Get a 10% Discount Code on any product with the code below
TUNDSDEV

See my keyboard cover in action with my review below 👇🏾

**********************************

RØDE Wireless Mic

RØDE SmartLavPlus Microphone

2021 Apple MacBook Pro (16-inch, Apple M1 Pro chip with 10‑core CPU and 16‑core GPU, 16GB RAM, 1TB SSD) - Space Grey

Apple Magic Keyboard with Numeric Keypad (Wireless, Rechargeable) 

Apple Magic Mouse

Secretlab TITAN 2020 Charcoal Blue Gaming Chair

ErgoFoam Ergonomic Foot Rest for Under Desk

Lumbar Support Pillow

Macbook Stand for Apple Macbook and All Notebooks

Portable Chair Green Screen Background

**********************************

#iosdev #iosdevelopment #swift #swiftlanguage #xcode #appdevelopment #mobileappdevelopment #iosappdevelopment #appdeveloper #iosprogramming #iosengineer #appdevelopmenttips #iosdevelopmenttips #swiftui
Рекомендации по теме
Комментарии
Автор

Nice video as always and yes... tutorial about Profile in Instruments!

rafaelplinio
Автор

Awesome video, thanks! YES! I'd really love to see a tutorial about instruments

SkoroVideo
Автор

Yes! A video 2:50 with that tool with be great.

chezchezchezchez
Автор

Thank you 🙌 do you have any videos on how to query it not on the main thread like you mentioned at the end?

keegan
Автор

Can you expand on the "Write a predicate to fetch data" (to avoid the @Query on the main thread)
My app uses a LOT of @Querys and the main thread is bogged down!
I need more speed.
Thanks!

chezchezchezchez
Автор

Excellent video on ModelActor macro. It was very helpful.

spaceman-is
Автор

great video, as always. +1 on a video on instruments!! I have a swift data project that is really bogging down when initiating a view that includes a dynamic filter predicate. I have no idea how to troubleshoot. thanks for what you do

jayelevy
Автор

Thanx for amazing video, but is it working also when i want to update data ?

AdelUI
Автор

When you set "Strict Concurrency Check" to "Complete", you will get a warning the message "Non-sendable type returned by call to actor-isolated function cannot cross actor boundary", How can void this.

ammarahmad
Автор

Why create an actor who you just reap everything into Task{let modelContext = ModelContext(container) ...} ?

stevethewindsurfer