Avoid hidden network traffic graph updates - #805
Merged
hebasto merged 2 commits intoJul 24, 2026
Conversation
This was referenced Jul 20, 2026
johnny9
marked this pull request as ready for review
July 22, 2026 16:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.