SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Memory Use/Leak with Image History

Open richardtallent opened this issue 5 months ago • 0 comments

Expected Behavior

Image History thumbnails and previews are sent to the browser but not stored in memory once they have been processed.

Actual Behavior

In the latest version, there seems to be a memory leak or other long-term storage of photos from the folder where the Image History sits. My folder had several thousand past images in folders by day (~5GB of JPEG files). After the latest update, startup was noticeably slower and memory usage kept climbing until the .NET process crashed at around 40GB.

Steps to Reproduce

Have a very large image history. Once I moved all of the old folders and left only folders from the past week, it's fine.

Debug Logs

Alas, didn't capture anything before I moved the files and got it working again.

Other

In my case, the folder where the images are stored is a mapped network drive on MacOS. So iterating folders and files can be a little slow. I don't think this was responsible for the runaway RAM use, but thought it was worth mentioning.

richardtallent avatar Sep 26 '24 05:09 richardtallent