diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-22 21:29:02 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-22 21:29:02 +0200 |
| commit | ed7dd57f605f809ec2eab943416a79647e69331d (patch) | |
| tree | de904079c55d58ff65339dd7a6d026e61ffaf2c4 /reload.sh | |
| parent | 8edd9865f592ea3808181f4a2803ebf114df0db0 (diff) | |
| download | quickshell-ed7dd57f605f809ec2eab943416a79647e69331d.tar.gz quickshell-ed7dd57f605f809ec2eab943416a79647e69331d.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'reload.sh')
| -rwxr-xr-x | reload.sh | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; } |
