Ross-Patterson / Portals-Desktop-Organization

A free, simple, lightweight and customizable tool for desktop organization on Windows.
https://portals-app.com
181 stars 1 forks source link

BUG: Memory Leak #353

Open SonicRay100 opened 3 months ago

SonicRay100 commented 3 months ago

Check the Help Site and GitHub Issues/Discussions

Version

3.3.0.9

Operating System

Windows 11

What happened?

There is a small memory leak when using Portals.

The leak is relatively small but can increase substantially when first setting up a portal, populating it, and configuring its appearance. Normally, Portals start out with about 130-140 MB of memory usage, but after a few modifications, I can see it using over 200 MB.

While this may not seem like a lot, it becomes far more noticeable when applying layouts. If you apply a layout a few times, the memory usage will increase by over 50 MB with each application, assuming the user has as many portals as I do (10). I stopped testing after seeing memory usage exceed 600 MB, as the leak doesn't seem to stop. Fortunately, this shouldn't be a significant issue, as most users won't be applying layouts continuously, and the memory leak can be resolved by simply restarting Portals.

This would be more problematic for users who put their computers to sleep or hibernate, rather than shutting down and flushing their memory. However, it’s easy to resolve by restarting Portals.

Steps to Reproduce

  1. Create several portals (the more, the better) and populate them with numerous items.
  2. Move them around and modify them while monitoring Portals' memory usage in Task Manager or another application that can display an app's memory usage.
  3. Save a layout and apply it to observe a larger memory leak.
  4. Repeat step 3 to confirm that the memory leak increases with each application of a layout.

What would you expect to happen?

Fix memory leak.

thx1200 commented 2 months ago

I've noticed after it runs for days the memory usage keeps going up, this must be why. I restart portals every few days.

Ross-Patterson commented 1 month ago

I will definitely check on this.