From ed7dd57f605f809ec2eab943416a79647e69331d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 21:29:02 +0200 Subject: reload: turn off incremental QML garbage collection 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 --- reload.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'reload.sh') 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; } -- cgit v1.2.3