View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • AI & Machine Learning
    • App Intents
    • Apple Intelligence
    • Games
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

More Videos

  • About
  • Summary
  • Power and Performance Group Lab

    Join us online for a deep dive into WWDC26 with Apple engineers and designers to ask questions, get advice, and follow the discussion about the week's biggest power and performance announcements. Conducted in English.

    Chapters

    • 0:00:00 - Introduction
    • 0:06:09 - As a beginner, what are the main factors that affect app power usage and performance in SwiftUI, and how can I design simple apps that avoid battery drain and lag?
    • 0:12:09 - What's the biggest power mistake you see in many apps that most developers don't realize they're making?
    • 0:15:18 - What is the best documentation for Instruments? Are there any written guides?
    • 0:17:45 - Our app shows UIKit/SwiftUI screens without much background work but Xcode reports "High" battery usage. What are best practices to find out why?
    • 0:20:11 - A theme object is injected via @EnvironmentObject and read in every atomic component across many nesting levels and hundreds of components. At what scale does this become a bottleneck, and is there a better approach?
    • 0:21:26 - How would you load large datasets (50K–500K records) in SwiftUI tables, and record/analyze performance and regressions using MetricKit?
    • 0:25:26 - How does iOS 27 prioritize background tasks when the system is under heavy Apple Intelligence workloads?
    • 0:28:15 - To avoid blocking the main thread I run expensive tasks on background threads, but during launch this causes many thread hops. How expensive is frequent thread hopping vs blocking, and is there a better approach?
    • 0:35:48 - Besides background tasks, what's the most common 'silent battery killer' in SwiftUI? How much does view over-invalidation drain, and what's the best Instruments workflow to catch it?
    • 0:37:40 - Are there performance improvements for very large lists and tables in SwiftUI on macOS 27, and best practices for tens or hundreds of thousands of items?
    • 0:39:52 - I use AnyView for type erasure in several places. How expensive is it in practice, and is there a threshold beyond which it becomes a problem — or is avoiding it premature optimization?
    • 0:42:01 - MetricKit, State Reporting, and Crash Report Extensions are new this year. Are there other headlining developer tools worth looking at that didn't make the Updates page?
    • 0:46:50 - Swift performance is something I want to go deep on. Beyond WWDC sessions and evolution proposals, what's the pathway — codebases, compiler internals, books, benchmarks — for building real expertise?
    • 0:49:20 - After the performance talk I avoided @escaping closure parameters, which helped performance but limits me — sometimes passing @escaping (or @ViewBuilder content) is essential. Any advice?
    • 0:50:29 - When handling dynamic data or heavy assets in SwiftUI, what are best practices to keep view updates from causing stutters or CPU spikes on older devices?
    • 0:55:11 - Our app relies on ARKit, Metal, and compute-intensive work and is used outdoors in direct sunlight, causing elevated thermal states. How should we manage thermal pressure and preserve a good experience?
    • 0:59:00 - Does using a lot of @Environment properties in a large SwiftUI app have any performance impact — e.g. many values injected across a deep view hierarchy?

    Resources

      • HD Video
      • SD Video
  • Search this video…
    • 0:00:00 - Introduction
    • Engineers from the performance and power teams introduce themselves and set up a session covering SwiftUI performance, energy usage and battery, Instruments, background tasks, MetricKit and the Xcode Organizer, and managing thermal pressure.

    • 0:06:09 - As a beginner, what are the main factors that affect app power usage and performance in SwiftUI, and how can I design simple apps that avoid battery drain and lag?
    • The biggest lever in SwiftUI is minimizing unnecessary redraws: separate your views from their inputs so a view only observes the state it actually depends on. When updates happen, you don't want to redraw content that didn't change — scoping observation tightly keeps CPU work down and avoids both lag and battery drain.

    • 0:12:09 - What's the biggest power mistake you see in many apps that most developers don't realize they're making?
    • There's no single culprit, but the most common one is insufficient telemetry and instrumentation. Without it you optimize the wrong things. Instrument your app to understand which features and scenarios users actually exercise, add metrics around them, and focus effort where it delivers the biggest return.

    • 0:15:18 - What is the best documentation for Instruments? Are there any written guides?
    • The Instruments tutorials are the best starting point — written by an Instruments engineer to feel like having one beside you, walking through the app step by step. They ship with an associated project that has performance issues built in, so you can practice detecting hangs and other problems hands-on.

    • 0:17:45 - Our app shows UIKit/SwiftUI screens without much background work but Xcode reports "High" battery usage. What are best practices to find out why?
    • This refers to Xcode's energy gauges. High background energy despite simple screens usually means the app is scheduling background work you may not be accounting for. Investigate which modes of your app schedule tasks, and profile with Instruments' energy/CPU tooling to pinpoint the actual source rather than trusting the gauge summary alone.

    • 0:20:11 - A theme object is injected via @EnvironmentObject and read in every atomic component across many nesting levels and hundreds of components. At what scale does this become a bottleneck, and is there a better approach?
    • There's no fixed number — it depends on the views involved. Environment is a genuinely useful abstraction for passing values down the view tree. The concern is invalidation scope: if the theme object changes, everything observing it redraws. Keep frequently-changing values out of a broadly-observed object, and split state so a change only invalidates the components that truly depend on it.

    • 0:21:26 - How would you load large datasets (50K–500K records) in SwiftUI tables, and record/analyze performance and regressions using MetricKit?
    • Load data lazily and scalably rather than materializing everything at once, so SwiftUI only builds visible rows. For measuring, MetricKit gives you aggregated field metrics (hang rate, CPU, memory) from real users; establish baselines and watch those signals across releases to catch regressions, complementing local Instruments profiling.

    • 0:25:26 - How does iOS 27 prioritize background tasks when the system is under heavy Apple Intelligence workloads?
    • The system balances background work against everything else running, including intelligence features. Don't assume a background processing or refresh task will run immediately or at a fixed time — design them to be resilient: express your work through the background task APIs, handle deferral and rate limiting gracefully, and retry later rather than depending on guaranteed execution windows.

    • 0:28:15 - To avoid blocking the main thread I run expensive tasks on background threads, but during launch this causes many thread hops. How expensive is frequent thread hopping vs blocking, and is there a better approach?
    • Each thread hop adds switching overhead, so doing it very frequently is a real cost — but occasional hops are fine and far preferable to blocking the main thread. Rather than hopping per small task, batch work onto a background context and hop back once with results. Profile with Instruments to see whether hopping or contention is actually your launch bottleneck.

    • 0:35:48 - Besides background tasks, what's the most common 'silent battery killer' in SwiftUI? How much does view over-invalidation drain, and what's the best Instruments workflow to catch it?
    • View over-invalidation is a major silent drain: repeatedly recreating views that look identical burns CPU with no visible change, which is exactly why it's easy to miss. Use the SwiftUI Instruments template to spot views updating more than they should, then narrow observation so each view depends only on the state it renders.

    • 0:37:40 - Are there performance improvements for very large lists and tables in SwiftUI on macOS 27, and best practices for tens or hundreds of thousands of items?
    • Help SwiftUI by keeping row sizing predictable — constant or known row heights let it manage a large list efficiently, whereas continually changing sizes forces expensive relayout. Combined with lazy containers so only visible rows are built, this keeps long lists and tables smooth at scale.

    • 0:39:52 - I use AnyView for type erasure in several places. How expensive is it in practice, and is there a threshold beyond which it becomes a problem — or is avoiding it premature optimization?
    • AnyView adds some overhead at view-creation time because it erases type information SwiftUI would otherwise use to diff efficiently. Avoid it where it's easy to, but don't contort your architecture around it — it's the kind of thing you can address if profiling shows it's actually a problem, rather than optimizing away preemptively.

    • 0:42:01 - MetricKit, State Reporting, and Crash Report Extensions are new this year. Are there other headlining developer tools worth looking at that didn't make the Updates page?
    • The Xcode Organizer is worth attention — like MetricKit it surfaces field data, but aggregated across your whole user population with visualizations, giving a different, broader view of real-world performance and power than per-session captures.

    • 0:46:50 - Swift performance is something I want to go deep on. Beyond WWDC sessions and evolution proposals, what's the pathway — codebases, compiler internals, books, benchmarks — for building real expertise?
    • Hands-on experience is what builds real expertise. Rather than only reading, work with the Instruments tools across many scenarios — the range of views and perspectives they provide teaches you how the system actually behaves. Profile real code, form and test hypotheses, and build intuition from measurement over time.

    • 0:49:20 - After the performance talk I avoided @escaping closure parameters, which helped performance but limits me — sometimes passing @escaping (or @ViewBuilder content) is essential. Any advice?
    • Where you can, call a closure in the view's init rather than in its body, so it doesn't re-run every time the view is re-evaluated — this avoids the cost that made escaping closures problematic while still letting you pass content in. Architect so expensive closure work happens once at construction, not on every body evaluation.

    • 0:50:29 - When handling dynamic data or heavy assets in SwiftUI, what are best practices to keep view updates from causing stutters or CPU spikes on older devices?
    • Right-size your assets to the use case — don't load a 2000×2000 image for a thumbnail; use appropriately scaled versions. Combined with minimizing view invalidation and doing heavy work off the main thread, tailoring asset sizes keeps update-driven CPU spikes and hitches down, which matters most on older hardware.

    • 0:55:11 - Our app relies on ARKit, Metal, and compute-intensive work and is used outdoors in direct sunlight, causing elevated thermal states. How should we manage thermal pressure and preserve a good experience?
    • Observe the system's thermal state API and adapt as it rises — scale back non-essential work, reduce frame rate or rendering fidelity, and defer background processing when the device enters higher thermal states. Designing graceful degradation tied to thermal state keeps the core experience responsive rather than letting the system throttle you abruptly.

    • 0:59:00 - Does using a lot of @Environment properties in a large SwiftUI app have any performance impact — e.g. many values injected across a deep view hierarchy?
    • The key factor is environment churn, not the number of values. Simply putting values into the environment and reading them in your views is inexpensive. The cost appears when those values update at high frequency: every view reading from the environment then has to re-evaluate whether what it depends on changed. So a deep hierarchy with many injected values is fine on its own — problems start when the environment churns frequently. The SwiftUI Instrument lets you see this in practice.

Developer Footer

  • Videos
  • WWDC26
  • Power and Performance Group Lab
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • AI & Machine Learning
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    • Documentation Archive
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines