title: Setting image property of UIImageView causes major lag
body: <p>Let me tell you about the problem I am having and how I tried to solve it. I have a UIScrollView which loads subviews as one scrolls from left to right. Each subview has 10-20 images around 400x200 each. When I scroll from view to view, I experience quite a bit of lag.</p>
  
  <p>After investigating, I discovered that after unloading all the views and trying it again, the lag was gone. I figured that the synchronous caching of the images was the cause of the lag. So I created a subclass of UIImageView which loaded the images asynchronously. The loading code looks like the following (<code>self.dispatchQueue</code> returns a serial dispatch queue).</p>
  
  <pre><code>- (void)loadImageNamed:(NSString *)name {
      dispatch_async(self.dispatchQueue, ^{
          UIImage *image = [UIImage imageNamed:name];
  
          dispatch_sync(dispatch_get_main_queue(), ^{
              self.image = image;
          });
      });
  }
  </code></pre>
  
  <p>However, after changing all of my UIImageViews to this subclass, I still experienced lag (I'm not sure if it was lessened or not). I boiled down the cause of the problem to <code>self.image = image;</code>. Why is this causing so much lag (but only on the first load)?</p>
  
  <p>Please help me. =(</p>