iOS and macOS Performance Tuning
Home > Computing and Information Technology > Computer programming / software engineering > Macintosh programming > iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift
iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift

iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

In iOS and macOS™ Performance Tuning, Marcel Weiher drills down to the code level to help you systematically optimize CPU, memory, I/O, graphics, and program responsiveness in any Objective-C, Cocoa, or CocoaTouch program.   This guide focuses entirely on performance optimization for macOS and iOS. Drawing on more than 25 years of experience optimizing Apple device software, Weiher identifies concrete performance problems that can be discovered empirically via measurement. Then, based on a deep understanding of fundamental principles, he presents specific techniques for solving them.   Weiher presents insights you won’t find anywhere else, most of them applying to both macOS and iOS development. Throughout, he reveals common pitfalls and misconceptions about Apple device performance, explains the realities, and helps you reflect those realities in code that performs beautifully. Understand optimization principles, measurement, tools, pitfalls, and techniques Recognize when to carefully optimize, and when it isn’t worth your time Balance performance and encapsulation to create efficient object representations, communication, data access, and computation Avoid mistakes that slow down Objective-C programs and hinder later optimization Fix leaks and other problems with memory and resource management Address I/O issues associated with drives, networking, serialization, and SQLite Code graphics and UIs that don’t overwhelm limited iOS device resources Learn what all developers need to know about Swift performance This book’s source code can be downloaded at github.com/mpw/iOS-macOS-performance.   Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.

Table of Contents:
About the Author xv Introduction xvii   Chapter 1: CPU: Principles 1 A Simple Example 2 The Power of Hybrids 10 Trends 11 Cost of Operations 12 Computational Complexity 14 Summary 16   Chapter 2: CPU: Measurement and Tools 17 Command-Line Tools 18 Xcode Gauges 22 Instruments 22 Internal Measurement 35 Dtrace 38 Optimization Beyond the Call of Duty 38 Summary 39   Chapter 3: CPU: Pitfalls and Techniques 41 Representation 41 Objects 48 Messaging 64 Methods 71 Multicore 72 Mature Optimization 75   Chapter 4: CPU Example: XML Parsing 79 An HTML Scanner 80 Mapping Callbacks to Messages 83 Objects 85 Objects, Cheaply 87 Evaluation 90 Tune-Ups 93 Optimizing the Whole Widget: MAX 94 MAX Implementation 96 Summary 97   Chapter 5: Memory: Principles 99 The Memory Hierarchy 99 Mach Virtual Memory 105 Heap and Stack 106 Resource Management 113 Summary 117   Chapter 6: Memory: Measurement and Tools 119 Xcode Gauges 119 Command-Line Tools 120 Internal Measurement 125 Memory Instruments 126 Summary 136   Chapter 7: Memory: Pitfalls and Techniques 137 Reference Counting 137 Foundation Objects vs. Primitives 141 Smaller Structures 142 Memory and Concurrency 146 Architectural Considerations 147 Temporary Allocations and Object Caching 151 NSCache and libcache 153 Memory-Mapped Files 153 madvise 156 iOS Considerations 157 Optimizing ARC 157 Summary 160   Chapter 8: Memory Example: FilterStreams 161 Unix Pipes and Filters 161 Object-Oriented Filters 163 DescriptionStream 164 Stream Hierarchy 170 Summary 171   Chapter 9: Swift 173 Swift Performance: Claims 173 Assessing Swift Performance 177 Larger Examples 188 Compile Times 191 Optimizer-Oriented Programming 195 A Sufficiently Smart Compiler 197 Summary 204   Chapter 10: I/O: Principles 205 Hardware 205 Operating System 208 Summary 214   Chapter 11: I/O: Measurement and Tools 215 Negative Space: top and time 216 Summary Information: iostat and netstat 217 Instruments 218 Detailed Tracing: fs_usage 221 Summary 224   Chapter 12: I/O: Pitfalls and Techniques 225 Pushing Bytes with NSData 225 Unixy I/O 230 Network I/O 232 Serialization 242 CoreData 253 SQLite 261 Event Posting 264 Segregated Stores 265 Summary 266   Chapter 13: I/O: Examples 267 iPhone Game Dictionary 267 Fun with Property Lists 271 Comma-Separated Values 282 Public Transport Schedule Data 283 Faster CSV Parsing 288 Summary 293   Chapter 14: Graphics and UI: Principles 295 Responsiveness 295 Software and APIs 296 Quartz and the PostScript Imaging Model 299 OpenGL 300 Metal 301 Graphics Hardware and Acceleration 301 From Quartz Extreme to Core Animation 305 Summary 308   Chapter 15: Graphics and UI: Measurement and Tools 309 CPU Profiling with Instruments 310 Quartz Debug 311 Core Animation Instrument 312 What Am I Measuring? 318 Summary 323   Chapter 16: Graphics and UI: Pitfalls and Techniques 325 Pitfalls 325 Techniques 326 Too Much Communication Slows Down Installation 327 Overwhelming an iPhone 330 It’s Just an Illusion 332 Line Drawing on iPhone 338 Summary 341   Chapter 17: Graphics and UI: Examples 343 Beautiful Weather App 343 Wunderlist 3 350 Summary 357   Index 359


Best Sellers


Product Details
  • ISBN-13: 9780321842848
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison-Wesley Educational Publishers Inc
  • Height: 226 mm
  • No of Pages: 400
  • Sub Title: Cocoa, Cocoa Touch, Objective-C, and Swift
  • Width: 178 mm
  • ISBN-10: 0321842847
  • Publisher Date: 27 Mar 2017
  • Binding: Paperback
  • Language: English
  • Spine Width: 22 mm
  • Weight: 640 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift
Pearson Education (US) -
iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!