Re: Download images and modify bundle?
Re: Download images and modify bundle?
- Subject: Re: Download images and modify bundle?
- From: Graham Cox <email@hidden>
- Date: Fri, 2 Jul 2010 22:31:11 +1000
On 02/07/2010, at 10:19 PM, sebi wrote:
> The problem is that I have thousands of files so I can't cache them all. Also there might be files with the same name and I have to use the newer one. So for every file access I have to look into both folders. Well, whatever, it's probably a bit tedious, but should be managable...
Use the principle of copy-on-write. Load the images (or info about them) from your bundle, but as soon as the user changes one, you know that the file now needs to be copied elsewhere. Maintain some sort of index that tells your system where to load each image from. That way you're only pulling changed images from outside of your bundle, and only writing them when they have changed. The index can be small and lightweight and fast to parse. Big performance win all round.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden