Live data from Hacker News

Lowering resource usage with foot and systemd

rgoswami.me

11–20 of 33 posts

Re: Lowering resource usage with foot and systemd

#11
IMO the best part of the foot client/server setup is not lower memory usage, but faster terminal opening time. Starting alacritty is kinda slow. Maybe not a second, but noticeable. Starting foot standalone is definitely faster. Opening a foot window via an already running server is near instant.

Re: Lowering resource usage with foot and systemd

#12
> Since I often work in strong sunlight, I often want to reconfigure my terminal to use a light or a dark scheme depending on the time of day.

Konsole can switch color theme with simple dbus message.

For the rest, I use tmux sessions and some scripts. When I restart computer, all terminal windows with remote ssh sessions get restored.

I do not need any modifications on server (except tmux or screen package).

Re: Lowering resource usage with foot and systemd

#13
post #11

IMO the best part of the foot client/server setup is not lower memory usage, but faster terminal opening time. Starting alacritty is kinda slow. Maybe not a second, but noticeable. Starting foot standalone is definitely faster. Opening a foot window via an already running server is near instant.

I switched from konsole to foot, when I upgraded to plasma6 (and therefore to wayland). One of the main reasons was actually startup time. I compared several terminals (konsole, alacritty, kitty, wezterm, foot) and foot had a notably faster startup time than the rest. For me it starts fast enough without a client/server setup, whereas konsole often slightly annoyed me, when I just wanted to execute a single command.

Re: Lowering resource usage with foot and systemd

#14

> Right of the bat, it is rather evident that this configuration will spawn two instances of foot, one for each scratchpad. > Figure 1: Snapshot of memory consumption (from btop), clients take around 10x less memory By all means use a server/clients approach if it reduces per-process memory, but it's probably not as bad as it looks, because AFAIK the actual executable only gets loaded once and then reused. So each pr…

> it's probably not as bad as it looks, because AFAIK the actual executable only gets loaded once and then reused

The actual foot executable is 427kb. RAM consumption win in the server setup is the shared glyph cache, which is most of the usage at startup.

> alacritty is only using That would be less than the image it’s drawing on screen, the glyph cache, or alacritty’s 11Mb executable. How are you measuring?

Re: Lowering resource usage with foot and systemd

#15
The title is kinda odd. "Lowering resource usage of foot with systemd" sounds more appropriate.

Not knowing that foot is a terminal emulator, I assumed that foot is some kind of improved resource manager that allows for a general lesser resource usage.

Re: Lowering resource usage with foot and systemd

#16

> Right of the bat, it is rather evident that this configuration will spawn two instances of foot, one for each scratchpad. > Figure 1: Snapshot of memory consumption (from btop), clients take around 10x less memory By all means use a server/clients approach if it reduces per-process memory, but it's probably not as bad as it looks, because AFAIK the actual executable only gets loaded once and then reused. So each pr…

[dead]

Re: Lowering resource usage with foot and systemd

#17

Really enjoyed foot! Runs along the same lines of emacs server and emacsclient. I ended up dropping it for the same reason I dropped emacs server. There are rare edge cases which causes the server to hang and thus taking down not just one instance of your work, but all of it. Losing the resilience of multiple processes is not worth the RAM it saves, not on modern hardware.

I just use it in normal / non server mode. Never had a crash. It’s still low resource and snappy enough for me.

Re: Lowering resource usage with foot and systemd

#18

I never heard about it but foot is a terminal emulator with some server mode [1]. — 1: https://wiki.gentoo.org/wiki/Foot#Server_mode_configuration

I had never heard about it either.

Here is the project official repository: https://codeberg.org/dnkl/foot

Re: Lowering resource usage with foot and systemd

#19
post #11

IMO the best part of the foot client/server setup is not lower memory usage, but faster terminal opening time. Starting alacritty is kinda slow. Maybe not a second, but noticeable. Starting foot standalone is definitely faster. Opening a foot window via an already running server is near instant.

> Starting alacritty is kinda slow.

I keep seeing comments like this popping up on HN. Do you guys have some funky esoteric configs?

In my case, where I only changed the color scheme and font, the limiting factor when starting alacritty is how fast I can move my fingers to the i3 shortcut. And I'm not running this on some exotic, fast hardware, just your standard crappy corporate HP laptop from a few years ago.

The only time there was a noticeable lag was when my zsh config was borked.

Post reply on HN