mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:03:39 +00:00
Avoid hidden network traffic graph updates #805
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!805
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/network-traffic-selected-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
QQuickPaintedItem::fillColorWhy
The previous timer was moved to a background thread, but its timeout updated a GUI-thread model every second regardless of whether the Network Traffic page was visible. That kept smoothing, full-history copies, signal delivery, and graph bindings active in the background. Timer/thread ownership was also not explicit during shutdown.
This keeps the inexpensive raw sample collection running off-thread while avoiding hidden GUI work and making worker shutdown deterministic.
LineGraphalso declared its ownfillColorproperty over the property inherited fromQQuickPaintedItem, producing a QML property-cache warning. The native property is now namedgradientColor; the publicNetworkTrafficGraph.fillColorAPI and rendering behavior are unchanged.User impact
Opening Network Traffic still shows the samples collected while the page was hidden, and changing the graph range rebuilds the visible history without losing totals. Other settings pages no longer pay for traffic graph updates or retain the graph objects.
Issue
Fixes #611.
Fixes #801.
Graph reset behavior was split from #611 into #806 and is intentionally not included here.
Validation
qmllint -I qml -I test/mocks/qml qml/components/NetworkTrafficGraph.qml qml/pages/node/NetworkTraffic.qml qml/pages/node/NodeSettings.qml test/qml/tst_nodesettings.qmlbitcoinqml_qmltests: 380 passed, 0 failedNetworkTrafficTowerTests: 6 passed, 0 failedgit diff --check origin/qt6...HEADThe aggregate unit executable was also run locally. Its Network Traffic suite passed; unrelated existing OptionsModel tests could not write the default Bitcoin data directory inside the managed filesystem sandbox.
ACK
35fecc9Sampling stays on the worker, GUI publish is gated on page activity
Tested manually