-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disk Fetch in background? #20
Comments
Can't you do that using a dispatch_async in tableView:cellForRowAtIndexPath: ? It might work out. |
I assume you mean call setImageURL inside a dispatch_async(dispatch_get_global_queue....) type thing. if setImageURL fires a network request instead of a diskfetch, the image will never be downloaded. However, if setImageURL does a disk fetch, AND you call setNeedsDisplay in imageViewDidLoad, this would work. I was looking for a more built in solution, possibly with the ability to cancel a disk fetch? though that is not likely. Also, using DISPATCH_QUEUE_PRIORITY_LOW is still pretty laggy for scrolling. Ideally, we would want to use DISPATCH_QUEUE_PRIORITY_BACKGROUND, but this constant is only available for iOS 5.0 ... |
After looking into - [EGOImageView setImageURL:]I noticed that it does everything there inside, like setting the image for the imageView which should be done in the mainThread, so you must not call this method in another thread. You'll have to modify the code to support this. Perhaps you can create another method that does the async stuff inside of it, or you can add a flag to the setImageURL: that allows you to choose whether you want set the image a/synchronously. |
I ran into this, and resolved it by serially loading images off the main thread (see my branch). scrolling while loading is then smooth and works well. |
Hello,
Is there any plans to defer disk fetch into a background thread/queue? This would help scrolling performance tremendously.
The text was updated successfully, but these errors were encountered: