Memory leak
I regularly see high memory usage from Hammerspoon when running spacehammer (more than 1GB). I have seen this at two different machines (intel and m1 macbooks) running the default config or this config.
Tested on macos 11.1 and 11.2, hammerspoon 0.9.82 and spacehammer 7d9ffe1a0d338f71e28b0cf54cdc7e24848b4092.
From what I can see the memory usage increases about 1MB when running Option-SPC a e a single time and never decreases after. Reloading the hammerspoon config from the console releases some memory, but not all. Only solution I've found is to fully restart hammerspoon to release the memory.
I don't know if this issue is in spacehammer/fennel/hammerspoon/something else but starting here if anyone has ideas on how to proceed!
when running Option-SPC a e
you mean when switching to Emacs? I do use that functionality all the time, but haven't noticed anything bad.
Thanks for the reporting it. This doesn't sound good. I'll keep an eye on that.
I have not noticed this issue either. My memory usage seems to hover around 165 MB even after running for a couple of weeks. I'll check again in a few days to see where it's at. Thanks for reporting as well.
Same here. Hammerspoon memory usage goes up to 1.4GB. Seems the issue is related to switching apps.
Which method of app switching?
- through
LEAD amenu, - or via the common-keys, set by default to
Option n/p
The second method uses https://www.hammerspoon.org/docs/hs.window.switcher.html. Do you use that a lot?
Through LEAD a menu, though I do use both methods.
I can't say I used that a lot, since I installed spacehammer for the first time yesterday and only used it for a couple of hours until my Mac slowed down and I noticed the memory issue.
@dangom would you mind pulling the latest? Let me know if you still see it eating up too much. Thanks!
Still seeing the same issue after the attempted fix :(
Damn. I guess, I'll keep digging. Thank you for testing it out.
I think this is probably the upstream issue in Hammerspoon. Searching for "memory" in the repo shows a few issues that look somewhat relevant. This one might be related https://github.com/Hammerspoon/hammerspoon/issues/2729
Close this? I've never seen it, it's probably fixed upstream, and almost definitely irrelevant to us.