Re: Concurrent loading of images ?
Re: Concurrent loading of images ?
- Subject: Re: Concurrent loading of images ?
- From: Alex Zavatone via Cocoa-dev <email@hidden>
- Date: Fri, 8 May 2020 11:54:45 -0500
iOS or MacOS?
> On May 8, 2020, at 11:53 AM, Gabriel Zachmann via Cocoa-dev
> <email@hidden> 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 (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
_______________________________________________
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