Pro ios Apps Performance. Optimization. Khang Vo. Apress*



Similar documents
MA-WA1920: Enterprise iphone and ipad Programming

Learning ios Programming

«compl*tc IDIOT'S GUIDE. Android App. Development. by Christopher Froehlich ALPHA. A member of Penguin Group (USA) Inc.

ITG Software Engineering

Practical Android Projects Lucas Jordan Pieter Greyling

Mobile Application Development

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

Schneps, Leila; Colmez, Coralie. Math on Trial : How Numbers Get Used and Abused in the Courtroom. New York, NY, USA: Basic Books, p i.

Objective C and iphone App

Zeenov Agora High Level Architecture

Lecture 3 Mobile App Development (Android, ios, BlackBerry, Windows Mobile) <lecturer, date>

Android Application Development Course Program

Mobile App Framework For any Website

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

Toad for Oracle 8.6 SQL Tuning

How To Develop An App For Ios (Windows)

Module Title: Software Development A: Mobile Application Development

Penetration Testing for iphone Applications Part 1

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

Pro ASP.NET 4 CMS. Using the JET 4 Framework. Advanced Techniques for C# Developers. Apress. Alan Harris

Performance monitoring at CERN openlab. July 20 th 2012 Andrzej Nowak, CERN openlab

Native ipad Apps? Why should I care?

Wiley Publishing, Inc.

Performance Analysis and Visualization of SystemC Models. Adam Donlin and Thomas Lenart Xilinx Research

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

BlackBerry Smartphone Application Development

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Master of Engineering - ME (Medical Software)

Android in Action. Second Edition. Revised Edition of Unlocking Android MANNING. (74 w. long.) W. FRANK ABLESON CHRIS KING ROBI SEN.

The story so far: Teaching Mobile App Development at PG level at Londonmet

Beginning Smartphone Web Development

Mobile App Design and Development

Enterprise Applications

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Mobile Performance Management Tools Prasanna Gawade, Infosys April 2014

Mobile Survey Software Migration: A Case Study. Jeff Hunsberger, jhunsberger@impactrx.com Peter Milla, peter@petermilla.com

Android Architecture. Alexandra Harrison & Jake Saxton

Here to take you beyond Mobile Application development using Android Course details

IOS App Development Training

PROJECT MANAGEMENT SYSTEM

Mobile Phones Operating Systems

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Mobile Operating Systems. Week I

Evading Android Emulator

Beginning BlackBerry 7

1 Introduction Services and Applications for HSPA Organization of the Book 6 References 7

Beginning Nokia Apps. Development. Qt and HTIVIL5 for Symbian and MeeGo. Ray Rischpater. Apress. Daniel Zucker

serious tools for serious apps

School of Computing and Information Sciences. Course Title: Computer Programming III Date: April 9, 2014

ICC. NetLink Version Info INDUSTRIAL CONTROL COMMUNICATIONS, INC.

Computer Architecture Syllabus of Qualifying Examination

Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module A Simple ios Application

Software Performance and Scalability

Tier Architectures. Kathleen Durant CS 3200

Developing Applications for ios

Cross Platform Applications with IBM Worklight

Android Developer Fundamental 1

2. About iphone ios 5 Development Essentials. 5. Joining the Apple ios Developer Program

ADOBE AIR. Working with Data in AIR. David Tucker

Smartphone Enterprise Application Integration

1. INTERFACE ENHANCEMENTS 2. REPORTING ENHANCEMENTS

Performance Tuning and Optimizing SQL Databases 2016


Das HappyFace Meta-Monitoring Framework

Mobile Field Service Engineer Application

CRESTRON-APP/CRESTRON-APP-PAD Control App for Apple ios

System Requirements for Microsoft Dynamics NAV 2016

INTERMEDIATE ANDROID DEVELOPMENT Course Syllabus

... Introduction Acknowledgments... 19

Developer Reference. A mobile loyalty platform for retailers. Document Number:

DIABLO VALLEY COLLEGE CATALOG

Computer Science. 232 Computer Science. Degrees and Certificates Awarded. A.S. Degree Requirements. Program Student Outcomes. Department Offices

Clarity PPM Fundamentals

APP DEV. We build your ideas into web and mobile applications. steicho. Technological Solutions

Oracle WebLogic Server 11g: Monitor and Tune Performance

City of Dublin Education & Training Board. Programme Module for. Mobile Technologies. leading to. Level 6 FETAC. Mobile Technologies 6N0734

ANDROID APPLICATION DEVELOPER RESUME

Guidelines to setup mobile devices to a UOITnet account Google Apps for Education. Information Technology Services

Top 10 Performance Tips for OBI-EE

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.

Computer Science. Computer Science 207. Degrees and Certificates Awarded. A.S. Computer Science Degree Requirements. Program Student Outcomes

University of Dayton Department of Computer Science Undergraduate Programs Assessment Plan DRAFT September 14, 2011

Dave Haseman, Ross. Hightower. Mobile Development for SAP* ^>. Galileo Press. Bonn. Boston

AppFabric. Pro Windows Server. Stephen Kaufman. Danny Garber. Apress. INFORMATIONSBIBLIOTHbK TECHNISCHE. U N! V En SIT AT S R!

Evaluation of Xamarin Forms for MultiPlatform Mobile Application Development

A Performance Evaluation of Open Source Graph Databases. Robert McColl David Ediger Jason Poovey Dan Campbell David A. Bader

Enterprise Mobile Application Development: Native or Hybrid?

Development. Wiley Publishing, Inc. 24-HOUR TRAINER. Brian Faucher WILEY

Learn GameSalad for. ios: Game. Development for. iphone, ipad, and HTML5. David Guerineau. Apress*

Example of Standard API

Game Center Programming Guide

Novell Filr 1.0.x Mobile App Quick Start

Expert Oracle Enterprise

How To Use Happyface (Hf) On A Network (For Free)

Nasuni Management Console Guide

Performance And Scalability In Oracle9i And SQL Server 2000

Android in opposition to iphone

Transcription:

Pro ios Apps Performance Optimization Khang Vo Apress*

Contents Contents at a Glance About the Author About the Technical Reviewer Acknowledgments Preface iv ix x xi xii I Chapter 1: Introduction to ios Performance Optimization 1 A New Era of Smartphone 1 Why Performance Matters 1 Who Should Use This Book? 2 My Teaching Style 2 What Do You Need? 3 How to Use This Book 3 An Overview of the Book 3 Source Code 5 Contact the Author 5 Chapter 2: Benchmark Your Apps with Tools: Simulators and Real Device Test 7 Simulator and Device 8 Memory and Performance 8 Tools 9 Basic Tools 9 Memory Allocation 11 Legacy Code 13 Performance Tools 18 Summary 37 8 Chapter 3: Increase and Optimize UlTableView Performance 39 Introduction to the Examples 39 Reviewing the Instrument Tool 40 First Example 41 Second Example 50 What Can You Learn from These Examples? 54 v

CONTENTS Other Techniques 54 Caching the Height 54 Opaque 55 Avoid Graphical Effects 55 Performance for Editing/Reordering 56 Summary 57 i Chapter 4: Increase App Performance Using Image and Data Caching Techniques 59 Differences in Performance Between Network, File, and Memory Processing 60 Introduction to Caching 62 What is Caching? 62 Cache Hit 62 Cache Miss 62 Retrieval Cost 63 Storage Cost 63 Cache Invalidation 64 Caching Algorithms 65 Measuring Cache 71 What You Should Cache 72 Where Should You Store Your Images? 72 Data Caching 77 Summary 85 IChapter 5: Tune Your App Using Algorithms and Data Structures 87 First Example 88 Theoretical Issues of Measuring Algorithmic Performance 89 How to Measure Big-0 90 Implementation Details 92 Big-0 of Famous Algorithms 92 Practical Measurement 93 Data Structure and Algorithms 95 Cocoa Touch Data Structures 95 Other Data Structures 106 Binary Tree 119 Graph 123 Other Algorithms and Problem-Solving Approaches 130 Recursion 131 SAX/DOM Parser for XML Parsing 132 Summary 133 Chapter 6: Improve Parallel Data Access using Multithreading Techniques 137 What Are Threads and Multithreading? 138 Threading Terminology 139 First Example 140 Benefits of Multithreading 142 How to Write Multithreaded Applications 143 Create a Thread 143 Configuring a Thread 150 vi

CONTENTS Your Thread Entry 151 Risks of Threads 154 Thread Synchronization 169 Alternatives to Threads 171 Thread Instrument for iphone 174 Summary 174 Chapter 7: Optimize Memory Usage for Better Performance 177 A Little Review 178 Old Object Ownership Policy 178 Autorelease 178 Autorelease Pool 179 Automatic Reference Counting 180 ARC Policy 182 New Qualifier for ARC 182 Object Property 183 Advanced Memory Issues 184 Retain/Relationship Cycles 184 Weak References 185 UlViewController 185 Load View Process 185 Unload View Process 186 Displaying and Hiding Views in the User Interface 187 Object Copy 188 Shallow vs. Deep Copy 188 Implementing a Deep Copy 189 Integrating a Copy Method into an Object 190 Advanced Autorelease Pool 191 Instruments 192 Static Analyzer 193 Leak Instrument 193 Zombie 194 Object Allocation 194 Memory Warning Levels 195 Summary 196 (Chapter 8: Integrate Multithreading and Efficient Memory Usage for Multitasking Apps Performance 197 What is Multitasking in iphone? 198 Multitasking Handler Methods 202 Multitasking Benefits and Costs 204 Background Services 205 Audio Service 206 Show Splash Screen 207 Location Service 207 Local Notification 211 Voice Over IP (VOIP) 211 Background Execution 211 What to Notice when Running in Background 213 vii

i* CONTENTS System Changes Notification 215 Dealing with ios Versions 216 Summary 216 ' Chapter 9: Improve Performance with Native C/C++ 219 Benefits and Costs 220 Basic C and C++ programming 221 C Programming 221 C++ Programming 231 A Practical Example 236 SQLite 236 Integrate C++ into Your Application 238 Summary 238 Chapter 10: Comparing Android and Windows Phone Performance Problems 241 Benchmarking on Emulator and Devices 242 Emulator and Devices 242 Benchmarking 244 Android 246 Windows Phone 248 Data Caching 249 Android 250 Windows Phone 251 Data Structure and Algorithms 253 Multithreading 255 Android 255 Windows Phone 257 Memory Management 258 Android 259 Windows Phone 260 Multitasking 261 Android 261 Support of C/C++ Programming 262 Summary 263 Index 265 vlil