AutoHotkey.Interop SendPipeMessage() Eats 4GB RAM

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
akaza_dorian
Posts: 9
Joined: 30 Nov 2019, 15:44

AutoHotkey.Interop SendPipeMessage() Eats 4GB RAM

Post by akaza_dorian » 16 Jan 2023, 19:49

It's basically here: https://github.com/AkazaRenn/FruitLanguageSwitcher/blob/dev/minimalist/Core/Hotkey.cs

Regularly the compiled program consumes like 80MB RAM, but once either of the hotkeys that involves SendPipeMessage is triggered, the memory usage bumps up to 4GB for about 10 sec, then get back to normal. The hotkey function will be unavailable during that time. You can refer to https://github.com/AkazaRenn/FruitLanguageSwitcher/blob/dev/minimalist/Core/Hotkey/CapsLock.ahk for the hotkey. Just hitting & releasing capslock should trigger it.

Is it something I should expect to happen to everyone, or an issue on my own side?

Thanks in advance!

akaza_dorian
Posts: 9
Joined: 30 Nov 2019, 15:44

Re: AutoHotkey.Interop SendPipeMessage() Eats 4GB RAM

Post by akaza_dorian » 16 Jan 2023, 20:54

Seems like a born nature of the pipe implementation, I've tried another approach which worked quite well: https://github.com/amazing-andrew/AutoHotkey.Interop/issues/9#issuecomment-314519379

Post Reply

Return to “AutoHotkey_H”