aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-22 21:29:02 +0200
committerDanilo M. <danix@danix.xyz>2026-10-22 21:29:02 +0200
commited7dd57f605f809ec2eab943416a79647e69331d (patch)
treede904079c55d58ff65339dd7a6d026e61ffaf2c4
parent8edd9865f592ea3808181f4a2803ebf114df0db0 (diff)
downloadquickshell-ed7dd57f605f809ec2eab943416a79647e69331d.tar.gz
quickshell-ed7dd57f605f809ec2eab943416a79647e69331d.zip
reload: turn off incremental QML garbage collectionHEADmaster
After a 33-minute suspend the desktop shell sat at ~45% of a core: its main thread ran flat out for about a second every two seconds, in step with the Perf 2s timer. Stack samples were almost all QV4 GC (GCStateMachine::transition, MarkStack::drain) entered from allocData via tryForceGCCompletion, under the regex loop in Perf.vram(), a 177-line parse that should take microseconds. The main thread also posted ~1000 events a second to its own eventfd, against a few dozen in the other shells. Reading: Qt 6.11's incremental collector, the default since 6.8, never completed a cycle after resume, so every allocation forced a full mark. QV4_GC_TIMELIMIT=0 is Qt's documented switch back to non-incremental collection. With it, after a 31-minute suspend the shell stayed at 0.3% and ~37 wakeups a second. The live autostart.lua sets it too; keep the two in step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rwxr-xr-xreload.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/reload.sh b/reload.sh
index 243a132..e856e90 100755
--- a/reload.sh
+++ b/reload.sh
@@ -23,6 +23,12 @@ if [ $# -eq 0 ]; then
set -- "${@%/shell.qml}"
fi
+# Qt 6.8+ runs the QML garbage collector incrementally. After a suspend the
+# desktop shell's collector was seen stuck mid-cycle: every allocation forced a
+# full mark, a 177-line parse took a second, and a core stayed busy. 0 turns
+# incremental collection off; keep it in step with hypr autostart.lua.
+export QV4_GC_TIMELIMIT=0
+
for c in "$@"; do
c=${c%/}
[ -f "$c/shell.qml" ] || { echo "$c: no shell.qml" >&2; continue; }