gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
26 stars 5 forks source link

Heap memory increasing without any reason #317

Closed AlexisDrogoul closed 1 month ago

AlexisDrogoul commented 1 month ago

Describe the bug After launching GAMA, in the lack of any specific action, the used heap memory steadily increases, reaching almost 1G after 10 min. Forcing a garbage collect makes it go back to the initial level (so there are no leaks).

Expected behavior That no memory is being used silently like this.

Desktop (please complete the following information):

AlexisDrogoul commented 1 month ago

After a careful analysis with YourKit, it turns out that the guilty process is the call to PollingMonitor.run() by Eclipse to periodically refresh the workspace. I had never noticed that before, but it seems harmless at first sight. To "fix" it, one can turn off the preference "Refresh using native hooks or polling" in the "Advanced..." section of the prefs, under General>Workspace.

Image 2024-09-09 22-04-54

Although not completely satisfying, it is a workaround.

AlexisDrogoul commented 1 month ago

The issue is still here on macOS Sequoia + Eclipse 2024-09, but much lighter : reaching 1G of used (and reclaimable) memory takes now 2-3 hours... So I close this issue from now on.