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
120
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
450
Other Decks in Programming
See All in Programming
業務時間外もAIに働いてもらう話
colorful12
3
10k
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
1.7k
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
7
3.5k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.1k
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.9k
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
320
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
140
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
AIエージェント時代のコードレビューを設計する
nogu66
6
2.6k
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
440
Featured
See All Featured
Visualization
eitanlees
152
17k
The Curse of the Amulet
leimatthew05
2
14k
A better future with KSS
kneath
240
18k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
510
BBQ
matthewcrist
89
10k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Everyday Curiosity
cassininazir
0
310
Faster Mobile Websites
deanohume
310
32k
Git: the NoSQL Database
bkeepers
PRO
432
67k
First, design no harm
axbom
PRO
2
1.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
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