365Cocoa

A snippet of Objective-C code per day, 365 days long.
Written by Pieter Omvlee, developer and owner of Bohemian Coding.

Mar 20

Day 22: perceived launch time

performSelector:withObject:afterDelay: has many uses, but I think there’s one which is often overlooked - at least as far as I know.

Performance is often a matter of perception and delaying methods by 0.0 can be an excellent remedy without needing to spawn threads. For Fontcase and Sketch I’ve been wanting to improve performance and speeding up launch time is one of them. I found that delaying the common setup-stuff I do at launch just by 0.0 can give a tremendous boost in perceived speed. For Fontcase I went down from 3-4 bounces to 1-2 bounces, at least on my mac. Sketch here launches in under one bounce and I’m quite pleased with that. So nothing fancy for today’s tip, but still quite useful I think


  1. jakemarsh reblogged this from 365cocoa and added:
    completely agree with Pieter on this one, this...user experience of your app!
  2. 365cocoa posted this