Graphics Reference
In-Depth Information
if (index == cell. tag )
{
imageView. image = image;
}
});
});
return cell;
}
When we run this updated version, the performance is better than the original nonthreaded
version, but still not perfect (see Figure 14.3).
We can see that the +imageWithContentsOfFile: method no longer appears at the top of
the CPU time trace, so we have fixed the loading delay. The problem is that we were
assuming that the only performance bottleneck for our carousel was the actual loading of
the image file, but that's not the case. Loading the image file data into memory is only the
first part of the problem.
Figure 14.3 Improved performance when loading on a background thread
Search WWH ::




Custom Search