Contents

Contents at a Glance

About the Author

About the Technical Reviewer

Acknowledgments

Preface

imagesChapter 1: Introduction to iOS Performance Optimization

A New Era of Smartphone

Why Performance Matters

Who Should Use This Book?

My Teaching Style

What Do You Need?

How to Use This Book

An Overview of the Book

Source Code

Contact the Author

imagesChapter 2: Benchmark Your Apps with Tools: Simulators and Real Device Test

Simulator and Device

Memory and Performance

Tools

Basic Tools

Memory Allocation

Legacy Code

Performance Tools

Summary

imagesChapter 3: Increase and Optimize UITableView Performance

Introduction to the Examples

Reviewing the Instrument Tool

First Example

SecondExample

What Can You Learn from These Examples?

Other Techniques

Caching the Height

Opaque

Avoid Graphical Effects

Performance for Editing/Reordering

Summary

imagesChapter 4: Increase App Performance Using Image and Data Caching Techniques

Differences in Performance Between Network, File, and Memory Processing

How to Identify the Bottleneck

Introduction to Caching

What is Caching?

Cache Hit

Cache Miss

Retrieval Cost

Storage Cost

Cache Invalidation

Replacement Policy

Caching Algorithms

Measuring Cache

What You Should Cache

Where Should You Store Your Images?

Data Caching

Summary

imagesChapter 5: Tune Your App Using Algorithms and Data Structures

First Example

Theoretical Issues of Measuring Algorithmic Performance

How to Measure Big-O

Implementation Details

Big-O of Famous Algorithms

Practical Measurement

Data Structure and Algorithms

Cocoa Touch Data Structures

Other Data Structures

Binary Tree

Graph

Other Algorithms and Problem-Solving Approaches

Recursion

SAX/DOM Parser for XML Parsing

Summary

imagesChapter 6: Improve Parallel Data Access using Multithreading Techniques

What Are Threads and Multithreading?

Threading Terminology

First Example

Benefits of Multithreading

How to Write Multithreaded Applications

Create a Thread

Configuring a Thread

Your Thread Entry

Risks of Threads

Thread Synchronization

Alternatives to Threads

Thread Instrument for iPhone

Summary

imagesChapter 7: Optimize Memory Usage for Better Performance

A Little Review

Old Object Ownership Policy

Autorelease

Autorelease Pool

Automatic Reference Counting

ARC Policy

New Qualifier for ARC

Object Property

Advanced Memory Issues

Retain/Relationship Cycles

Weak References

UIViewController

Load View Process

Unload View Process

Displaying and Hiding Views in the User Interface

Object Copy

Shallow vs. Deep Copy

Implementing a Deep Copy

Integrating a Copy Method into an Object

Advanced Autorelease Pool

Instruments

Static Analyzer

Leak Instrument

Zombie

Object Allocation

Memory Warning Levels

Summary

imagesChapter 8: Integrate Multithreading and Efficient Memory Usage for Multitasking Apps Performance

What is Multitasking in iPhone?

Multitasking Handler Methods

Multitasking Benefits and Costs

Background Services

Audio Service

Show Splash Screen

Location Service

Local Notification

Voice Over IP (VOIP)

Background Execution

What to Notice when Running in Background

System Changes Notification

Dealing with iOS Versions

Summary

imagesChapter 9: Improve Performance with Native C/C++

Benefits and Costs

Basic C and C++ programming

C Programming

C++ Programming

A Practical Example

SQLite

Integrate C++ into Your Application

Summary

imagesChapter 10: Comparing Android and Windows Phone Performance Problems

Benchmarking on Emulator and Devices

Emulator and Devices

Benchmarking

Android

Windows Phone

Data Caching

Android

Windows Phone

Data Structure and Algorithms

Multithreading

Android

Windows Phone

Memory Management

Android

Windows Phone

Multitasking

Android

Support of C/C++ Programming

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset