Closed marcel-ihle closed 1 year ago
@marcel-ihle Could you provide details to me? e.g. gif file size, settings (single image or slideshow, e.t.c) and your usage (one window or many editor window open and close)
1 window only, setting is on single image, file is attached (5.46 MB),
I'm not too sure if the whole GIF is even played, it seemed to jump back to the first frame after some seconds, even though the original file is almost seamless. The memory usage seems to slowly go up over time, I couldn't really directly observe it within a few minutes when trying to recreate it, so I went back to coding and after about 1 hour, VS became very slow to respond, so I checked and again, 90% memory usage.
I guess MediaElement
control extract all frame to memory from animation gif. That your gif image may be consumed 3GB+ memory per one time. If I use other control such as https://github.com/XamlAnimatedGif/XamlAnimatedGif , can avoid usage large memory, however application always read frame from gif file, and it is low framerate.
In many case, this behavior is no problem. MediaElement is uses low memory for video and short/small animation gif files. maybe.
Normaly, static image can use one object such as singleton. But MediaElement can not singleton for multi window(background), in my case. And, I can not solve that behaviors, now.
Expand to IDE
in ClaudiaIDE option. I guess IDE use only one MediaElement. (but if you take out window from main window, IDE load new MediaElement, maybe..)Enable gif animation
. If you choose video file (.mp4), ClaudiaIDE still available play it.I do use Expand to IDE
, so that doesn't really solve it, but it's fine, if it doesn't really work, there isn't too much we can do. From your message, it seems MP4 works well though? I will try that, thank you for looking into this problem. 🙂
Edit: MP4 works great. 🙂
I was pleasantly surprised after coming back from the weekend to see that the background suddenly moved. I went on to code for about 1 hour and Visual Studio was at 90% RAM usage, which is quite extreme, considering I have 64 GB RAM.