journalctl-mode
journalctl-mode copied to clipboard
Slow "journalctl | wc -l"
Hi, I was trying out this neat package and noticed that M-x journalctl
froze my emacs until I aborted with C-g
. After a bit of investigating I noticed that during M-x journalctl
it spawned a journalctl | wc -l
command that was using up one cpu core and blocking emacs. I guess (journalctl--run '(""))
ends up invoking that and takes forever to finish. I managed to work around this by vacuuming my logs from about 1 GB to 100 MB, but even then it takes a moment to count all the lines. Perhaps this behaviour could be fine tuned a bit so that it doesn't try to consume the whole log contents and instead defaults to something like journalctl --boot
?
That is a known issue. I have an idea, how to solve it, but it will take a moment to address. I am working on asynchronous process support, which should make journalctl-mode faster and less resource intensive in general. For the moment I can only ask you to be patient.
Would it be more performance efficient to call libsystemd - sd-journal?