iOS or MacOS?

> On May 8, 2020, at 11:53 AM, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> I have kind of a slide-show app.
> 
> Sometimes, when it switches from one image to the next, there is a noticeable 
> lag when the file size of the next image is very big, say, 50 MB or more.
> Sometimes, it seems that loading the image takes 1-2 seconds.
> 
> So, I was thinking, maybe it helps to load the next image concurrently, while 
> the current one is still being displayed.
> 
> My question is: should I spawn a thread (using NSThreads' 
> detachNewThreadSelector), load the image in that thread, then exit the 
> thread? (no run loop)
> 
> Or should I use NSObject's performSelectorInBackground ?
> 
> I also read about the GCD's dispatch queues, but it seems to me that this 
> would not be the suitable approach since I always only have one task running 
> concurrently to the main thread.
> 
> What do you think?
> 
> Best regards, Gabriel
> 
> _______________________________________________
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

_______________________________________________

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

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

Reply via email to