Open simonmichael opened 2 years ago
hledger-ui --watch uses https://hackage.haskell.org/package/fsnotify, which uses:
Platform | Haskell lib | C lib | Problem confirmed |
---|---|---|---|
GNU/Linux | hinotify | the linux kernel's inotify feature | Yes |
FreeBSD, OpenBSD | hinotify | inotify-tools port | |
Mac | hfsevents | Cocoa CoreServices | Yes |
WIndows | Win32 | Windows API (this?) |
This was also discussed on #836 in 2019, and is currently documented at https://hledger.org/hledger-ui.html#watch-mode-limitations.
An idle hledger-ui with
--watch
, left running for days, may show gradually increasing CPU usage - 1%, 2%, 3%, 4%... I have always seen this on mac, and @the-solipsist sees it on ubuntu gnu/linux. I believe it is more apparent when you have a lot of accounts / transactions. I seem to remember, or I have assumed, that it's a problem with the underlying C file-watching library (which might be different on each platform). As a workaround, you can occasionally quit and restart hledger-ui (q
,C-p
,enter
), or suspend and resume it when not in use (C-z
,fg
,enter
). It's quite unfortunate.