Skip to content

squint 0.1.6

Choose a tag to compare

@bisand bisand released this 16 Sep 03:42
· 11 commits to main since this release

An empty squint now costs a fifteenth of the memory and wakes thirty times less often.

Measured on an Atom x5-Z8350 running Alpine and Hyprland, with a window open and no document in it:

0.1.5 this
Memory 138 MB 18 MB
CPU before it settles 1.87 s 0.13 s
Thirty idle seconds 540 ms of CPU, 240 wakeups 20 ms, 8 wakeups
  • A face costs what its file does. Faces are read glyph by glyph as they are drawn, rather than every glyph being worked out when the file is opened — 80 MB of FiraCode Nerd Font and DejaVu Sans outlines were most of what squint held. The text is the same to the pixel.
  • The caret stops blinking. Ten seconds after the last keystroke it rests lit, and the window sleeps until something happens, instead of drawing a frame twice a second for as long as it is open.
  • Nothing is polled. Files handed over by a second squint, and the settings window's Save, wake the window when they happen; squint had been looking for both four and twenty times a second.
  • A machine with no GPU is remembered. Where no GPU can draw the window, squint writes that down and draws in software from the start next time, rather than loading the graphics drivers to find out again — which on that machine is 37 MB and most of the start-up. It tries again after an upgrade, and SQUINT_PRESENT=gpu or =software still decides when it is set.

Built on DeniseUI 0.30.0, which is where the first three live.