On 6 Feb 2009, at 11:16 am, Shawn Erickson wrote:

Since inputString is large you really should avoid causing it to be
copied over and over again


I agree wholeheartedly, the autorelease pool "solution" is a sticking plaster on a gaping wound. A better approach is to avoid the need for it in the first place. I'd also say that this looks like a O(n^2) operation which might be slow given the file sizes you mentioned. If this is being run on the main thread you might need to give some thought to keeping your app responsive, maybe by breaking this down into shorter chunks (or shunt this off onto another thread - it looks like a reasonable candidate).

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to