EarTrumpet icon indicating copy to clipboard operation
EarTrumpet copied to clipboard

Upgrade gif playback library / first time run memory usage improvement

Open rocksdanister opened this issue 4 years ago • 1 comments
trafficstars

Description

When starting for the first time EarTrumpet consumes large amount of memory, this is likely because: Currently for the initial intro screen WpfAnimatedGif library is used for Welcome.gif playback but the same author has an improved library XamlAnimatedGif - one of the key improvement being:

Resource efficiency The old library used an awful lot of memory, because of the way it worked internally (prepare all frames beforehand, keep them in memory and assign them in turn to the Image control). XamlAnimatedGif renders the frames just-in-time using a WriteableBitmap, so only one frame at a time is loaded in memory. The CPU usage is still small, unless the image is very large. Also, since the Image.Source property doesn't change during animation, it avoids triggering a layout pass every time.

Steps to reproduce

  1. Install program.
  2. Open for first time, see intro screen.
  3. High memory usage.
  4. Closes window, memory usage does not drop immediately.

Meta

  • EarTrumpet version: 2.1.8.0
  • Windows 10 version: 19042.985

Screenshots

Screenshot 2021-05-19 232402

Additional context

Not a priority, once GC does its thing the memory should drop eventually.

rocksdanister avatar May 19 '21 18:05 rocksdanister

Hey, that's cool! Will definitely take a look, thanks!

riverar avatar May 19 '21 18:05 riverar

If it can be achieved, this is a good thing

StudentWeis avatar Sep 28 '22 08:09 StudentWeis

Thanks for your patience. Update 2.2.1.0 is now available via multiple channels. Closing.

riverar avatar Nov 09 '22 17:11 riverar