swift 184

Swift 동시성 시각화 및 최적화 (Visualize and optimize Swift Concurrency) - WWDC22

Swift 동시성 시각화 및 최적화 (Visualize and optimize Swift Concurrency) - WWDC22 목차Swift Concurrency Recap 동시성 최적화 방법Concurrency OptimaizationThread Pool Exhaustion잠재적 스레드 풀 고갈 및 동시성 코드 오용 문제Continuation Misuse이를 방지하는 방법 Swift Concurrency Recap - Async/await은 블록 단위로 구성되어 thread blocking 없이도 작업을 실행 도중에 일시 중단 했다가 다시 재개할 수 있음.- Task는 동시성 코드의 기본 작업 단위로 동시성 코드를 실행하고 코드 상태 및 관련 데이터를 관리하는 데 사용. - Task에는 지역 ..

apple/WWDC 2025.05.01

Meet distributed actors in Swift - WWDC22

Meet distributed actors in Swift - WWDC22 Swift의 동시성을 단일 프로세스 이상으로 활용하는 방법에 대해 알아볼 것 Distributed Actor와 상호작용 하는 방식을 바꾸지 않고도 잠재적으로 멀리 있을 수 있는 것을 의미이는 분산된 Actor가 어디에 있든 간에 동일한 방식으로 소통할 수 actor 간 소통이 가능함을 의미.이는 테스트에 있어 코드의 구현을 변경할 필요 없이 actor를 이동시킬 수 있음. 분산 Actor를 선언하려면 Swift 5.7에서 도입된 Distributed를 선언해야 함. distibuted를 사용하면 actor는 컴파일 타임에 검사 가능함. id는 distibuted actor 시스템에서 actor를 고유하게 식별하는데 사용...

apple/WWDC 2025.04.30

구조화된 동시성의 기초를 넘어 (Beyond the basics of structured concurrency) - WWDC23

구조화된 동시성의 기초를 넘어 (Beyond the basics of structured concurrency) - WWDC23 목차Task hierarchyTask cacnellationTask priorityTask group patternsTask-local valuesTask traces Task hierarchy 구조화된 동시성을 사용하면 동시적 코드를 추론할 수 있음.실행이 분기하여 동시에 실행되고, 해당 결과가 다시 재합류하는 그 지점을 잘 정의하여 그 지점을 사용할 수 있음.`if block`과 `for loop`가 동기식 제어 흐름의 동작을 정의하는 방식과 비슷 동시성을 정의하는 방법은 여러가지가 있으나, 모든 작업이 구조화된 것은 아님.구조화된 작업은 작업이 선언된 스코프에서 끝까지 살..

apple/WWDC 2025.04.25

iOS 최적화된 디스크 쓰기 관리

iOS 최적화된 디스크 쓰기 관리 데이터 저장을 위해 디스크에 쓰는 행위는 배터리 수명 및 저장 장치의 수명에 영향을 미침.디스크 쓰기를 줄이는 방법을 이해하면 앱 성능을 최적화하고 사용자 경험을 개선할 수 있음.  일반적으로 모든 iOS기기와 일부 macOS는 영구 저장소로 SSD를 사용함. SSD나 저장 매체에 있는 데이터에 엑세스 하는 속도는 RAM에 비해서 느림. Xcode와 Instruments를 사용하여 앱의 디스크 쓰기 성능을 파악할 수 있음. SSD 접근 최적화하기시스템이 SSD의 블록에 쓰기 작업을 수행할 때 해당 블록에 대한 새로운 읽기 요청은 기존 수행하는 쓰기 작업이 완료할 때 까지 대기함.SSD에 쓰는 것은 읽기 보다 느린 작업.읽기 및 쓰기 요청을 인터리빙하면 앱의 성능이 느..

iOS 캐싱 로직 구현 전 디스크 분석

iOS 캐싱 로직 구현 전 디스크 분석 앱에서 서버를 통해 값을 받아온 후 이 값을 캐싱하고 있다가 사용자가 앱을 종료 후에 다시 접속한 경우 캐싱된 값을 먼저 보여준 후 네트워크 응답이 도착하면 갱신하는 형태로 구현하고자 함. UserDefaults, SwiftData, CoreData, Realm, Filemanager 중에서 어떤걸 선택하는 것이 좋은지 궁금해서 비교해보기로 함.UserDefaults: 간단한 데이터 저장에 유용해 적합하지 않을 것으로 보임.SwiftData: iOS 17이상이라서 현재 현실적으로 사용하기가 어려움.CoreData: Realm이 있어서 굳이 써야하는지 의문이긴 함.Filemanager: 자주 변경되는 데이터라서 성능적으로 적합하지 않을 것 같음.Realm: 12.2..

[HLS] Creating a Multivariant Playlist

Creating a Multivariant Playlisthttps://developer.apple.com/documentation/http-live-streaming/creating-a-multivariant-playlist동일 컨텐츠의 다른 인코딩을 제공하기 위한 여러 플레이리스트.목차Adding alternate media to a playlistIncorporating Ads into a PlaylistVideo on Demand playlist constructionEvent playlist constructionLive Playlist (sliding window) constructionHTTP Live Streaming OverviewCreating a Multivariant Playlist..

apple/HLS 2024.12.05

[HLS] HTTP Live Streaming Overview

HTTP Live Streaming Overviewhttps://developer.apple.com/documentation/http-live-streaming목차Adding alternate media to a playlistIncorporating Ads into a PlaylistVideo on Demand playlist constructionEvent playlist constructionLive Playlist (sliding window) constructionHTTP Live Streaming OverviewCreating a Multivariant PlaylistOverviewHLS(HTTP Live Straming)은 애플 디바이스에서 멀티미디어를 재생하기 위해 웹서버에서 HTTP 오디..

apple/HLS 2024.12.05

[HLS] Live Playlist (sliding window) construction

Live Playlist (sliding window) constructionhttps://developer.apple.com/documentation/http-live-streaming/live-playlist-sliding-window-construction라이브 세션 플레이리스트를 위한 기본 구성에 대한 이해목차Adding alternate media to a playlistIncorporating Ads into a PlaylistVideo on Demand playlist constructionEvent playlist constructionLive Playlist (sliding window) constructionHTTP Live Streaming OverviewCreating a Multi..

apple/HLS 2024.12.05

[HLS] Event playlist construction

Event playlist constructionhttps://developer.apple.com/documentation/http-live-streaming/event-playlist-construction이벤트 세션 플레이리스트의 기본 구조에 대해 학습목차Adding alternate media to a playlistIncorporating Ads into a PlaylistVideo on Demand playlist constructionEvent playlist constructionLive Playlist (sliding window) constructionHTTP Live Streaming OverviewCreating a Multivariant PlaylistOverview이벤트 플레이리스..

apple/HLS 2024.12.05