-
Notifications
You must be signed in to change notification settings - Fork 123
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
SmoothScrolling: Images not loading or taking too long while scrolling fast #20
Comments
It was the beta OS... I have found out that it gave that message when executing
inside the function to download the images. Now I have just installed tvOS 12 beta 6 and that message eventually disappeared. Also MUCH improving the performances. Some images still do not get loaded, though, and they may still take few seconds to replace the avatar. Unless it is still caused by the beta OS, sure. |
Thanks for the update @Michelasso! |
Hi @andrea-prearo, thanks for answering! I actually get the same identical issues on iOS, tested on my iPad. Again, I have all my devices on beta OS (plus Xcode 10 beta), so that is most likely causing issues itself (it does for sure with the BoringSSL now, a new warning message appearing in iOS/tvOS 12 beta 6, slowing down the execution and thus probably ruining again the flow). The first page gets loaded twice by the app, though. Oh well, in few weeks they'll all go GM, so I'll know better. Thanks again! |
Sounds good. Thanks! |
Hi,
I have read your tutorial so I decided to check the full sample code, also to port it to tvOS (but I get the same exact issues in iOS). I have run many tests, also trying to fix it myself (fat chance!) and when fast scrolling in a way or another something goes wrong. Either few images do not get loaded at all or they may take even 10 seconds to show.
I have put some extra logging and it seems like the old operations get executed even if the current cell is much far away. (I mean, something like #311 and following are loading, with many other is the middle, while #663 is showing) That would increase the time to load, I suppose. Then there is the issue of some avatars not showing at all, but they show later scrolling aways and then back.
Then I noticed that just after launch the first page gets loaded twice. But if I define the page size as the number of visible elements:
userViewModelController.retrieveUsers(pageSize: collectionView.visibleCells.count)
where in retrieveUsers() I added the parameter "pageSize" it seems to be fixed.
Last but not least... Any idea why I get this warning? It spams everywhere!
Actually i see that a big slowdown is caused by those messages, so they may be the root of the problem. I know it is just a tutorial, but it would help me greatly to understand why sometime it goes banana. Thanks!
PS: I forgot to mention that I am using Xcode 10 beta, iOS 12 beta and tvOS beta. Although with other programs I made using collection views the last issue doesn't present itself. Still if it works just fine for you it might be something with my environment.
The text was updated successfully, but these errors were encountered: