-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: optimize memory usage of tcell
library on init
#7579
chore: optimize memory usage of tcell
library on init
#7579
Conversation
There are two changes here: * build `machined` binary with `tcell_minimal` tag (which disables loading some parts of the terminfo database), which also affects `apid`, `trustd` and `dashboard` processes, as they run from the same executable; in `dashboard` explicitly import `linux` terminal we're using when the `dashboard` runs on the machine * pass `TCELL_MINIMIZE=1` environment variable to each Talos process which removes 0.5MiB of runewdith allocation for a lookup table See siderolabs#7578 Signed-off-by: Andrey Smirnov <[email protected]>
Final allocs on
with
with
The code which deactivates with the env variable: https://github.com/gdamore/tcell/blob/47ec3a77754f83e84481fc9cdd0bc2072cd292ba/cell.go#L195-L201 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒
744912 bytes before. 54192 bytes after.
and also -21ms startup time (out of full 34ms). |
/m |
There are two changes here:
machined
binary withtcell_minimal
tag (which disables loading some parts of the terminfo database), which also affectsapid
,trustd
anddashboard
processes, as they run from the same executable; indashboard
explicitly importlinux
terminal we're using when thedashboard
runs on the machineTCELL_MINIMIZE=1
environment variable to each Talos process which removes 0.5MiB of runewdith allocation for a lookup tableSee #7578