- Replaced pass-by-value std::string parameters with const std::string&
or std::string_view to prevent SSO overallocations.
- Refactored static mapping functions in UPower to return
std::string_view instead of constructing std::string literals, enabling
perfect cache locality.
- Optimized string concatenation in hot loops (network IPs, inhibitor
lists, sway window marks) by using std::string::append() and
pre-reserving capacity instead of overloaded operator+ which produces
temporary heap instances.
These optimizations reduce high-frequency memory churn and overall heap
fragmentation within the main rendering loops.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Command tests did not assert behavior when exec fails in child processes.
I added deterministic regression coverage that forces execl/execlp failure and
verifies non-zero exit status propagation for both open() and forkExec paths.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
SafeSignal could queue events forever when worker threads emitted faster than
the main loop could consume, which risks memory growth and stale updates.
I added a queue cap with a drop-oldest policy so growth stays bounded under
burst load, plus a regression test that validates bounded delivery.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
SleeperThread concurrency paths needed stress coverage around wake/stop races.
I added a subprocess stress test that repeatedly interleaves wake_up() and
stop() and verifies the worker exits cleanly.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
We needed a regression test for reassignment safety after lifecycle fixes.
I added a subprocess test that reassigns SleeperThread workers and verifies the
process exits normally instead of terminating.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>