evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
277 stars 44 forks source link

Performance issue when trying to "show" many images in a loop #82

Open Ariandr opened 5 years ago

Ariandr commented 5 years ago

There is an issue when I try to show many images at once. In my case there are 57 images (urls). I realized that fact because of the Time Profiler. There was a noticeable lag during scrolling (1-1.5 sec) and I decided to investigate.

self.bannerImageView.auk.removeAll()
for urlStr in bannerURLs { // 57 elements in the array
    self.bannerImageView.auk.show(url: urlStr)
}

Is it possible to create a method which will be able to receive not one image at a time (or url), but an array of them and therefore do less work under the hood? It's just my thoughts and I don't really know if it's possible to implement, but in my opinion it will be a useful feature of the library.

evgenyneu commented 5 years ago

Hi @Ariandr, that's a good idea. Feel free to submit a pull request.