araten10 / EdgewarePlusPlus

Expansion to PetitTournesol's fetishware "Edgeware", adding more features and config options.
MIT License
57 stars 19 forks source link

gif and animated webp take long to load #97

Open Wombatant1 opened 1 month ago

Wombatant1 commented 1 month ago

Hey, I observed that since updating to current version, some animated popups (mostly gifs and webps) can take a really long time to load - something that hasn't been an issue on either v11 or v12. I'd say my setup is rather good (i7 10700, 32gb ram, running from pcie ssd, win 10) so i think it's not a hardware issue. Edit: To be precise, 'long time to load' can take from a few seconds to not getting loaded at all in 5 minutes

LewdDevelopment commented 1 month ago

Are there any particular packs or files that have this problem? Have you checked through the debug script if there are errors which may be preventing the animations from loading?

Wombatant1 commented 1 month ago

The pack most affected is my own gif/webp heavy one, but I had a similar experience with "brasilian miku" from WTO. I ran debug and found this:

[000001f2a67263f0] avcodec decoder: Using D3D11VA (NVIDIA GeForce RTX 4070 Ti SUPER, vendor 10de(NVIDIA), device 2705, revision a1) for hardware decoding
[000001f2a675e280] direct3d11 vout display error: SetThumbNailClip failed: 0x800706f4
Exception in thread Thread-24 (init_animation):
Traceback (most recent call last):
  File "C:\Users\%%\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "C:\Users\%%\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "X:\13\edgeware\src\widgets\image_label.py", line 53, in init_animation
    self.animate()
  File "X:\13\edgeware\src\widgets\image_label.py", line 57, in animate
    self.config(image=frame)
  File "C:\Users\%%\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1722, in configure
    return self._configure('configure', cnf, kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\%%\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1712, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: invalid command name ".!imagepopup6.!imagelabel"
[vp8 @ 000001f2a82a3f80] get_buffer() failed
[vp8 @ 000001f2a82a3f80] thread_get_buffer() failed
[vp8 @ 000001f2a82a4d00] get_buffer() failed
[vp8 @ 000001f2a82a4d00] thread_get_buffer() failed
[000001f2b2150720] direct3d11 vout display error: SetThumbNailClip failed: 0x800706f4
Wombatant1 commented 1 week ago

so i have discovered that this is connected with the image scaling. Someone here described the way to change the range of image scales, which turns out the bigger the picture, the longer it takes to load the gif. if i set the scale to 20, 30 gifs loads with little to no lag. The other thing I found out is that it is also connected with screen resolution - I'm using 4k display, when setting lower resolution (fhd) loading times gets shorter