• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Concurrent loading of images ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Concurrent loading of images ?


  • Subject: Concurrent loading of images ?
  • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
  • Date: Fri, 8 May 2020 18:53:35 +0200

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

  • Follow-Ups:
    • Re: Concurrent loading of images ?
      • From: Jens Alfke via Cocoa-dev <email@hidden>
    • Re: Concurrent loading of images ?
      • From: Alex Zavatone via Cocoa-dev <email@hidden>
    • Re: Concurrent loading of images ?
      • From: Alex Zavatone via Cocoa-dev <email@hidden>
  • Prev by Date: Re: Xcode Build Location
  • Next by Date: Re: Concurrent loading of images ?
  • Previous by thread: Re: Xcode Build Location
  • Next by thread: Re: Concurrent loading of images ?
  • Index(es):
    • Date
    • Thread