I came across your post on large memory usage in GTK4 (https://www.reddit.com/r/GTK/comments/vv55p4/gtk4_memory_usage_unexpectedly_high/).
I had the same problem myself. In GNU/Linux, running GTK4 apps with the environment variable GSK_RENDERER=cairo significantly reduces memory usage (see gtk-rs/gtk4-rs#1732 (comment)).
Since your software does not require any heavy graphics, there is no harm in not using hardware acceleration (and using cairo).
You can set the environment variable with a desktop file with which the app will run (and the makefile can generate that).
I came across your post on large memory usage in GTK4 (https://www.reddit.com/r/GTK/comments/vv55p4/gtk4_memory_usage_unexpectedly_high/).
I had the same problem myself. In GNU/Linux, running GTK4 apps with the environment variable
GSK_RENDERER=cairosignificantly reduces memory usage (see gtk-rs/gtk4-rs#1732 (comment)).Since your software does not require any heavy graphics, there is no harm in not using hardware acceleration (and using cairo).
You can set the environment variable with a desktop file with which the app will run (and the makefile can generate that).