Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

perf(updater): the update chip pulses forever and keeps an idle app at ~30% of a CPU core

オープン
#1,554 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
79/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, flutter

調査の方向性

Start with lib/features/updater/update_available_badge.dart and inspect how _pulse.repeat(reverse: true) is controlled, then review the existing badge tests for isPulseAnimating and pulseDuration. Implement a finite initial pulse that leaves the badge in its active colors, and update those tests. The acceptance criteria also call for a cpu_idle_update_badge scenario in benchmark/app_perf_bench.dart; done means the chip still draws attention when it appears and CPU use drops to about 0% once the app is idle.

索引モデルが issue の本文から書いたものです。

説明

bug P2 performance ui
Problem

While the "vX.Y.Z available" chip is shown (UpdateAvailableBadge, title bar), the app animates it forever with _pulse.repeat(reverse: true) (lib/features/updater/update_available_badge.dart). The animation never stops, so the engine produces a frame at the display rate for as long as the window is open, and an otherwise idle app burns about a third of a CPU core.

This is every user who has a newer release available and has not pressed "Remind me later" (the chip stays until the update is installed or dismissed).

Measurements

Profile build of current dev (0.4.22+5), Linux, 120 Hz display, window 2056x2616. CPU time of all threads of the process from /proc/<pid>/task/*/stat, SQL workspace open, nothing happening:

State CPU, % of one core Frames in 8 s
no update pending 0.0-0.1% 0
update pending, chip pulsing 29-31% 475-480 (~59 fps)

Thread split with the chip: main thread ~1.8-2.0 s of CPU per 8 s (~3.8-4.2 ms per frame), raster ~0.32-0.35 s, GL / compositor threads ~0.1 s.

The same effect showed up when I first measured the real app on 0.4.18, where an update to 0.4.19 existed: 30-38% of a core on the welcome screen with nothing happening, 0.0% after updating.

Wrapping the chip in a RepaintBoundary (tried, reverted) did not help: 29.4% vs 31.4%. The cost is the per-frame pipeline of the whole app (~4 ms main thread per frame), not repainting the chip, so the fix is to produce fewer frames, not to shrink the repaint.

Solution (any of these, ordered by effect)
  1. Finite pulse. Pulse a few cycles when the chip appears (e.g. 3 x 1.4 s) and then settle to the static "active" colors. After that the app is idle again (0%).
  2. Pause when the window is not visible. No pulse in the background / minimized (AppLifecycleState != resumed, or WidgetsBindingObserver), restart on focus.
  3. Optionally re-pulse once per day or on hover, instead of continuously.

Reduced motion already stops it (QueryaMotionLevel.off / disableAnimations); the default Full level should not be a permanent animation either.

Acceptance
  • With an update pending and the window idle, CPU drops to ~0% after the initial pulse (measure with the same /proc sampling; add a cpu_idle_update_badge scenario to benchmark/app_perf_bench.dart).
  • Existing badge tests (isPulseAnimating, pulseDuration) updated for the finite pulse.
  • Chip still catches the eye when it first appears.

Related: #987 (120 Hz epic).

主要言語
Dart
スター
23
フォーク
1
平均マージ
31分
マージ済み PR(30日)
570

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QueryaHub/Querya-Desktop のほかの issue

QueryaHub/Querya-Desktop の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。