perf(wave1): reduce Config caps, reorder Client/Monitor for cache
Wave 1 changes: - Reduce CFG_MAX_KEYBINDS 256→128, CFG_MAX_STRLEN 256→64, CFG_MAX_ARGS 16→8 → saves ~2.5 MB BSS from Config struct - Add truncation warnings to config_load when keybind/button/scroll limit reached - Reorder Client struct: HOT fields (type, mon, tags, floating flags, geom) in first cache line, COLD fields (wl_listeners) at end — saves cache misses in arrange() - Reorder LayerSurface struct similarly - Split Monitor into Monitor/MonitorCold: hot fields (~120B) stay inline, cold layout state lazily allocated on first dwindle/master use - All cold-field accesses through m->cold-> indirection - cleanupmon frees m->cold - Zero-warning build with clang -Werror -Wpedantic
This commit is contained in:
+3
-3
@@ -6,9 +6,9 @@
|
||||
/* Maximum lengths. Good for the soul, they say */
|
||||
#define CFG_MAX_RULES 64
|
||||
#define CFG_MAX_MONITORS 16
|
||||
#define CFG_MAX_KEYBINDS 256
|
||||
#define CFG_MAX_ARGS 16
|
||||
#define CFG_MAX_STRLEN 256
|
||||
#define CFG_MAX_KEYBINDS 128
|
||||
#define CFG_MAX_ARGS 8
|
||||
#define CFG_MAX_STRLEN 64
|
||||
#define CFG_MAX_AUTOSTART 32
|
||||
#define CFG_MAX_AUTOSTART_CMD 512
|
||||
|
||||
|
||||
Reference in New Issue
Block a user