Auk icon indicating copy to clipboard operation
Auk copied to clipboard

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

Open Ariandr opened this issue 6 years ago • 1 comments

  • Library setup method: CocoaPods
  • Version of the library. 'moa', '~> 10.0' 'Auk', '~> 9.0'
  • Xcode version. 10.1
  • OS version. 12.1.1

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.

Ariandr avatar Dec 17 '18 12:12 Ariandr

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

evgenyneu avatar Dec 22 '18 09:12 evgenyneu