Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Performance Optimization for iOS Apps
Search
Vitalii Topoliuk
August 14, 2013
Programming
130
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Performance Optimization for iOS Apps
Tips & Tricks from personal experience.
Vitalii Topoliuk
August 14, 2013
More Decks by Vitalii Topoliuk
See All by Vitalii Topoliuk
Responsive UI for iOS Apps
vtopoliuk
5
460
Other Decks in Programming
See All in Programming
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
370
Simple Storage Service(S3) is not simple
iwatsukayura
0
280
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Railsバージョンを4倍にした話
optim
0
220
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
16k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Kotlinの15年とServer-Side Kotlin
n_takehata
1
140
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
110
contenteditable と日本語入力に向き合う
colorful12
0
200
ChromeでローカルLLM
ryu1013
0
130
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Statistics for Hackers
jakevdp
799
230k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
New Earth Scene 8
popppiees
4
2.7k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Transcript
Performance Optimization Vitalii Topoliuk @vtopoliuk
- Performance scenarios - How to measure performance - How
to improve key scenarios - Tips and Tricks Contents:
- Not just about speed - CPU tasks - Memory
- Rendering - File I/O - Networking - Power Performance Performance scenarios
- Not just about speed - CPU tasks - Memory
- Rendering - File I/O - Networking - Power Performance Performance scenarios
Overall recommendations Performance scenarios - Don’t guess, just measure -
Measure on slowest device - Measure on pessimistic data - Measure on real data
How to measure Performance scenarios - Instruments - Logging -
Quartz Debug (OS X)
CPU Performance Optimization
- Unhappy users CPU CPU Tasks Optimization
- Unhappy users - System can abort your app CPU
CPU Tasks Optimization
Time Profiler Demo CPU Tasks Optimization
CPU Tasks Optimization
CPU Tasks Optimization
- do less work - do work later - do
slow in background and use placeholders - do work faster Main strategies CPU Tasks Optimization
Memory Performance Optimization
- Crashes => Unhappy Users Memory Memory Optimization
Allocations & Leaks Demo Memory Optimization
Memory Optimization
Memory Optimization
Memory Optimization
- do less work - do work later - break
down work to smallest batches - use ARC :) - @autoreleasepool Main strategies Memory Optimization
.nib loading Tips and Tricks x10 faster
ARC vs MMM Tips and Tricks - (void)getPoints:(DPoint[2])outPoint forCenterPoint:(DPoint)centerPoint targetingVector:
(DVector)targetingVector skipEquation:(BOOL)skip lineWidth:(DFloat)lineWidth { DVector normVector = DVectorNormalVector(targetingVector); DFloat originX = centerPoint.x + (lineWidth / 2.0f) * normVector.x; ... // some code outPoint[1] = (DPoint){originX, originY}; }
ARC vs MMM Tips and Tricks x5 faster on MMM
- (void)getPoints:(DPoint[2])outPoint forCenterPoint:(DPoint)centerPoint targetingVector: (DVector)targetingVector skipEquation:(BOOL)skip lineWidth:(DFloat)lineWidth { DVector normVector = DVectorNormalVector(targetingVector); DFloat originX = centerPoint.x + (lineWidth / 2.0f) * normVector.x; ... // some code outPoint[1] = (DPoint){originX, originY}; }
Universal solutions Tips and Tricks [self.array addObject:[NSValue valueWithCGPoint:point]] xxx times
faster VS @interface DPointsCollection : NSObject - (void)addPoint:(CGPoint)point atIndex:(NSUInteger)index; - (void)removePointAtIndex:(NSUInteger)index; ... @end
Sorted NSArray Tips and Tricks [self.array addObject:object]; [self.array sortUsing...];
Sorted NSArray Tips and Tricks NSUInteger index = [self.array indexOfObject:object
inSortedRange:range options:NSBinarySearchingInsertionIndex usingComparator:comparator]; [self.array insertObject:object atIndex:index];
Delay large tasks Tips and Tricks - (void)addPerson:(DPerson*)person { ...
[self save]; // large task } - (void)addBook:(DBook*)book { ... [self save]; // large task }
Delay large tasks Tips and Tricks - (void)addPerson:(DPerson*)person { ...
[self delayedSave]; } - (void)addBook:(DBook*)book { ... [self delayedSave]; } - (void)delayedSave { [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(save) object:nil]; [self performSelector:@selector(save) withObject:nil afterDelay:0.1f]; }
API Levels Tips and Tricks - try high level API
first - then try lower level NSArray => CFArray => void* NSXMLParser => libxml
Questions & Answers Performance Optimization