Menu

#118 [Bug]: Gifs are laggy

open
nobody
ui (21)
2023-04-21
2022-10-15
Anonymous
No

Originally created by: Im-Fran

Describe the Bug

Bug Description
The gifs that are shown are laggy, and even more when viewing a folder.

Reproducing the Bug

  1. Hover a gif
  2. See the lag

Version

0.5.1 (Build 15)

Category

Media (images, audio, video etc.)

Relevant Log Output

No response

Screenshots

This is from Official Discord:

This is from SwiftCord

Additional Info

No response

Discussion

  • Anonymous

    Anonymous - 2022-10-17

    Originally posted by: cryptoAlgorithm

    This appears to be yet another issue related to SwiftyGif not being so swifty after all. I might have to implement a more performant implementation using CoreGraphics directly.

     
  • Anonymous

    Anonymous - 2023-04-07

    Originally posted by: ErrorErrorError

    @cryptoAlgorithm you could consider using Nuke which does simplify a lot of the image loading if that's something you don't want to reimplement from scratch.

     
  • Anonymous

    Anonymous - 2023-04-07

    Originally posted by: cryptoAlgorithm

    @ErrorErrorError That's interesting, it like a good alternative to replace both CachedAsyncImage and SwiftyGif 🤔. And it even has first-class SwiftUI support. I will consider refactoring with Nuke in a PR to evaluate its advantages soon.

     
  • Anonymous

    Anonymous - 2023-04-21

    Originally posted by: cryptoAlgorithm

    @ErrorErrorError I dug deeper and it appears that we are back with the same issues as before. Nuke is a performant image loading solution, but out of the box it does not support rendering animated GIFs (or any other format not natively supported by the system). I'll have to integrate it with another library which actually renders GIFs, and the bottleneck we're facing resides in this rendering library.

    It's a bit of a bummer, but I might still consider migrating to Nuke from CachedAsyncImage as it appears to have better caching and loading heuristics.

     
  • Anonymous

    Anonymous - 2023-04-21

    Originally posted by: cryptoAlgorithm

    After throwing together some quick code to use Nuke instead of CachedAsyncImage to evaluate its suitability, I have come to the conclusion that migration isn't worth it as it actually leads to (very noticeably) worse scrolling performance, albeit with slightly better caching (and so lower network activity). I feel that scrolling performance impacts virtually all users, so saving a few kBs of network activity is not worth it for the significant scroll jank.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.