~/talk

Optimising image heavy applications

Talkat iOS Conf SG 2022 · 2022-01-20..01-21· [web-performance]
slides:none on file

Image decoding is CPU and memory heavy and UIImage often keeps decoded pixel buffers proportional to source resolution not view size, which explodes memory for large source images; decoding and caching cause fragmentation and can trigger compression or OOMs. Use Image I/O downsampling with CGImageSource with kCGImageSourceShouldCache=false and cgImageCreateThumbnailAtIndex to create thumbnails, run decoding asynchronously on a serial queue, and use collection view prefetching to avoid breaching the 16 ms frame budget.

AI-written summary · about

  1. 0:00Start
  2. 5:58UIImage encapsulates this process
  3. 7:35However, decoding is expensive
  4. 12:16Downsampling - Step 1
  5. 15:25Dealing with CPU spikes due to downsampling
  6. 16:37Prefetching!
  7. 17:03Asynchronous downsampling serialQueue.async
  8. 17:50Additional Notes
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.