SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Profiling & Performance
             for fun and profit
                            Greg Heo (@gregheo)
                              11 January 2012




Hi there! @gregheo at the keys. These are the slides and presentation notes from my #iOSTO talk.
Please feel free to get in touch if you have any questions or comments.
Survey

           • Developers?
           • Instruments users?
           • Profiling enthusiasts?

Survey shows: lots of developers; some instruments users (mostly using the “Leaks” tool); and only
a handful of time profiling users.
Why to not Profile?

           • You might not need to!


iOS users demand excellent performance. Credit goes to Apple for a well-performing API too. We
developers have very few excuses for poor performance.
“Great programmers ship.”
            – Managers everywhere
Why Profile?

         • The app is slow!


Refactoring code (especially other people’s code) is what programmers love doing. Resist! Think
bug/feature regression and possible delays.
“Premature optimization
          is the root of all evil”
                              – Knuth




Knuth said it. Enough said.
“Measure twice, cut once”
                                                              – carpenters?




You must have an objective measure. Re-factor and optimize the bottlenecks and hotspots to get
the most value in terms of programmer time invested vs. outcome.
Items to note: the playback/recording metaphor; the purple chart shows CPU usage.
“Hide system libraries” is handy to hide all those pesky objc_msgSend() calls.
The high-level call tree view.
Annotated code view. Very handy.
Summary

           • Profile, fix, profile again.
           • Ship the app already!


Profile before and after to verify performance has indeed improved. Use the tools; they’re there to
help!

Weitere ähnliche Inhalte

Was ist angesagt?

sixth sense technology
sixth sense technologysixth sense technology
sixth sense technology
Anjali patil
 

Was ist angesagt? (6)

They Ain't Gonna Read It!
They Ain't Gonna Read It!They Ain't Gonna Read It!
They Ain't Gonna Read It!
 
Workflow Samples
Workflow SamplesWorkflow Samples
Workflow Samples
 
sixth sense technology
sixth sense technologysixth sense technology
sixth sense technology
 
How to learn programming for begineers!
How to learn programming for begineers!How to learn programming for begineers!
How to learn programming for begineers!
 
Handoff Tool - Sympli & iOS 14 features
Handoff Tool - Sympli & iOS 14 featuresHandoff Tool - Sympli & iOS 14 features
Handoff Tool - Sympli & iOS 14 features
 
Beer & Beta by Flockler - Feb 4th 2016
Beer & Beta by Flockler - Feb 4th 2016Beer & Beta by Flockler - Feb 4th 2016
Beer & Beta by Flockler - Feb 4th 2016
 

Andere mochten auch (7)

Nicolas Grekas (Blackfire) – App Profiling - the Must-Have Tool of your Daily...
Nicolas Grekas (Blackfire) – App Profiling - the Must-Have Tool of your Daily...Nicolas Grekas (Blackfire) – App Profiling - the Must-Have Tool of your Daily...
Nicolas Grekas (Blackfire) – App Profiling - the Must-Have Tool of your Daily...
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Performance Profiling in a Virtualized Environment
Performance Profiling in a Virtualized EnvironmentPerformance Profiling in a Virtualized Environment
Performance Profiling in a Virtualized Environment
 
Goldsun Focus Multi Screen Network
Goldsun Focus Multi Screen NetworkGoldsun Focus Multi Screen Network
Goldsun Focus Multi Screen Network
 
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
 
Performance Profiling of Virtual Machines
Performance Profiling of Virtual MachinesPerformance Profiling of Virtual Machines
Performance Profiling of Virtual Machines
 
Performance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profilingPerformance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profiling
 

Ähnlich wie Profiling & Performance for Fun and Profit

Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
ZeroTurnaround
 
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
IndicThreads
 
UXMen Velocity Comic
UXMen Velocity ComicUXMen Velocity Comic
UXMen Velocity Comic
Ali MacDonald
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
Hyun-woo Park
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Mickael Istria
 

Ähnlich wie Profiling & Performance for Fun and Profit (20)

Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
 
The Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelFThe Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelF
 
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
 
The Economics of OptimJ
The Economics of OptimJThe Economics of OptimJ
The Economics of OptimJ
 
UXMen Velocity Comic
UXMen Velocity ComicUXMen Velocity Comic
UXMen Velocity Comic
 
Ios - Intorduction to view controller
Ios - Intorduction to view controllerIos - Intorduction to view controller
Ios - Intorduction to view controller
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
 
Creating a compiler for your own language
Creating a compiler for your own languageCreating a compiler for your own language
Creating a compiler for your own language
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptx
 
30 days or less: New Features to Production
30 days or less: New Features to Production30 days or less: New Features to Production
30 days or less: New Features to Production
 
Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with android
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016
 
Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Profiling & Performance for Fun and Profit

  • 1. Profiling & Performance for fun and profit Greg Heo (@gregheo) 11 January 2012 Hi there! @gregheo at the keys. These are the slides and presentation notes from my #iOSTO talk. Please feel free to get in touch if you have any questions or comments.
  • 2. Survey • Developers? • Instruments users? • Profiling enthusiasts? Survey shows: lots of developers; some instruments users (mostly using the “Leaks” tool); and only a handful of time profiling users.
  • 3. Why to not Profile? • You might not need to! iOS users demand excellent performance. Credit goes to Apple for a well-performing API too. We developers have very few excuses for poor performance.
  • 4. “Great programmers ship.” – Managers everywhere
  • 5. Why Profile? • The app is slow! Refactoring code (especially other people’s code) is what programmers love doing. Resist! Think bug/feature regression and possible delays.
  • 6. “Premature optimization is the root of all evil” – Knuth Knuth said it. Enough said.
  • 7. “Measure twice, cut once” – carpenters? You must have an objective measure. Re-factor and optimize the bottlenecks and hotspots to get the most value in terms of programmer time invested vs. outcome.
  • 8.
  • 9.
  • 10. Items to note: the playback/recording metaphor; the purple chart shows CPU usage.
  • 11. “Hide system libraries” is handy to hide all those pesky objc_msgSend() calls.
  • 12. The high-level call tree view.
  • 13. Annotated code view. Very handy.
  • 14. Summary • Profile, fix, profile again. • Ship the app already! Profile before and after to verify performance has indeed improved. Use the tools; they’re there to help!