Repository navigation
Conversation
Replace five frequently invoked on-device Python scripts with small,
dependency-free C99 binaries (-Wall -Wextra -Werror -std=c99) to cut
RSS spikes (~20 MiB -> <2 MiB) and cold-start latency (~150-400 ms ->
<5 ms) on 1 GiB devices:
- omarchy-desktop-ready (desktop/configuration/desktop-ready.c):
runs at login and PIN screen readiness.
- omarchy-rotation-lock (desktop/configuration/rotation-lock.c):
toggled from the Display panel and read by the rotation daemon.
- omarchy-launcher-recent-files (desktop/configuration/launcher-recent-files.c):
runs when opening the app launcher to parse recently-used.xbel.
- omarchy-render-labwc-theme & omarchy-render-labwc-buttons
(desktop/configuration/render-labwc-{theme,buttons}.c):
run on first boot and every theme switch.
Add unit tests in tests/test_c_runtime_helpers.py verifying strict C99
compilation and functional parity, and wire all five into Makefile,
desktop/install-tree, and tests/package_tree.py.
Assisted-by: LLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Following #229 (
rotate-output.c) and #230 (auto-brightness.c), rewrite five frequently invoked on-device Python helpers into small, dependency-free C99 binaries (-O2 -Wall -Wextra -Werror -std=c99) to eliminate Python interpreter RSS spikes (~20 MiB → <2 MiB) and cold-start lag (~150–400 ms → <5 ms) on 1 GiB devices:omarchy-desktop-ready(desktop/configuration/desktop-ready.c) — runs at login and PIN screen readiness (/usr/libexec/omarchy-desktop-ready).omarchy-rotation-lock(desktop/configuration/rotation-lock.c) — toggled from the Display panel and read by the rotation daemon (/usr/bin/omarchy-rotation-lock).omarchy-launcher-recent-files(desktop/configuration/launcher-recent-files.c) — parsesrecently-used.xbeland queriesxdg-mimewhen opening the app launcher (/usr/bin/omarchy-launcher-recent-files).omarchy-render-labwc-theme(desktop/configuration/render-labwc-theme.c) &omarchy-render-labwc-buttons(desktop/configuration/render-labwc-buttons.c) — run on first boot (first-theme) and every theme switch (omarchy-theme-set), eliminating 2 Python spawns per theme switch.Verification
-O2 -Wall -Wextra -Werror -std=c99on both hostx86_64andaarch64-linux-gnu-gcc(~70 KiB unstripped each, zero external library dependencies).tests/test_c_runtime_helpers.pycovering all 5 helpers;test_c_runtime_helpers.py,test_sudo_policy.py,test_package.py,test_package_staging.py,test_idle_wakeups.py,test_kde_theme.py, andtest_upstream_gtk_theme.pyall pass (38/38).Assisted-by: LLM