perf(browser): move favicon probe off the page-load critical path#414
Merged
nicoburns merged 2 commits intoDioxusLabs:mainfrom May 3, 2026
Merged
Conversation
The favicon resolver was awaited inside DocumentLoader::load_document, so every navigation blocked on a network round-trip plus a full image decode of the icon before the new document could be swapped in. The decode also ran on the async executor thread. Split favicon resolution into a synchronous candidate-URL computation and an async probe. The loader returns immediately with the candidate; the tab spawns the probe in the background and writes tab.favicon_url when it resolves (gated on the tab still being on the same page, so a stale probe can't stomp a newer navigation). History entries created with favicon=None get patched in place via a new BrowsingHistory:: set_favicon(id, url), keyed by the entry id record_visit now returns. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
@nicoburns see details in commit. The performance hit was sluggish enough to merit a quick PR to fix it IMHO. |
nicoburns
approved these changes
May 3, 2026
Member
|
Thanks! |
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.
Page navigations were blocking on a favicon fetch plus a full image decode before swapping in the new document, adding a round-trip of latency to every load. This moves the probe into a background task spawned after the document is applied, with stale-probe guards on the tab and id-keyed patching of history entries so a late-arriving icon still updates the right row.