Commit Graph

9 Commits

Author SHA1 Message Date
Austin Horstman
4c71b2bf9f perf(memory): optimize C++ string operations to reduce heap fragmentation
- 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>
2026-03-02 22:54:07 -06:00
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Michael Swiger
2d80d31527 Fix tray icon scaling on multi-display setups 2021-08-16 23:33:29 -07:00
Alex
6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Alex
346ec68578 refactor: format tray && partial fix for #235 2019-04-17 14:19:04 +02:00
Robinhuett
29a2ee1744 refactor: Replace all occurencec of gtkmm.h and only use the necessary headers 2019-01-08 21:05:44 +01:00
Alexis
ad7400d5ce refactor(ALabel): add interval 2018-11-23 11:57:37 +01:00
Alexis
0b1b0eb1a7 feat(tray): multiple hosts 2018-11-22 16:20:49 +01:00
Alexis
ba79b4d397 refactor(tray): cleanup and fixes 2018-11-22 15:47:23 +01:00