Re: Prioritize my own app's disk access
Re: Prioritize my own app's disk access
- Subject: Re: Prioritize my own app's disk access
- From: Quincey Morris <email@hidden>
- Date: Tue, 05 Jul 2016 10:20:06 -0700
- Feedback-id: 167118m:167118agrif8a:167118s9SPjzfgY3:SMTPCORP
On Jul 5, 2016, at 05:36 , Jonathan Taylor <email@hidden> wrote:
>
> suggestions that might be relevant here
What worries me about the Darwin-level (i.e. Unix-level) API suggestions that others have made is that you don’t know how these interact with Cocoa apps. You didn’t actually say whether your app is a Cocoa app, but if so …
I think the best modern approach is to route your CPU and IO usage via GCD. That is, from the point where some callback gives you raw video, use dispatch_async to schedule the processing on a GCD queue, and use the GCD I/O primitives to actually do the I/O.
That will allow you to specify a quality of service (“user interactive” is the highest), which should interact properly with other apps, e.g. the Finder doing a large copy.
That should take care of CPU and IO. For memory, I agree with Jens that you should preallocate and reuse memory buffers, rather than re-allocating them, as far as possible.
_______________________________________________
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