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:
@@ -26,6 +26,7 @@ void monocle(Monitor *m);
|
||||
/* helpers used across modules */
|
||||
[[nodiscard]] int current_tag_idx(Monitor *m);
|
||||
[[nodiscard]] const Layout *curlayout(Monitor *m);
|
||||
void ensure_cold(Monitor *m);
|
||||
|
||||
/* dwindle tree helpers (exposed for swapdir) */
|
||||
[[nodiscard]] DwindleNode *dwindle_find_leaf(DwindleNode *n, Client *c);
|
||||
|
||||
Reference in New Issue
Block a user