MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WebView2 performance optimization: Seeking best practices for flag usage in real-world browser app

Open
#5,321 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hi everyone,

I've been doing deep performance profiling using the BrowserBench Speedometer benchmark.

To explore tuning options, I tested a variety of WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS, including:

--disable-features=msSmartScreenProtection,msWebView2EnableTrackingPrevention,msWebView2EnableShoppingFeatures,msWebView2EnableFamilySafety
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-backgrounding-occluded-windows
--no-first-run
--msWebView2CodeCache
--js-flags=--scavenger_max_new_space_capacity_mb=8

However, Speedometer scores remain largely unchanged, even in isolated test environments. Would appreciate guidance on whether this is the right approach, or if there's anything else I could try to improve runtime performance in this context.

Would appreciate these clarifications:

  1. Which of these flags are actually respected in WebView2 (specifically in WinUI 2 vs. WinUI 3), and are there any additional relevant Microsoft-specific flags?
  2. Are msSmartScreenProtection and msWebView2EnableTrackingPrevention considered officially supported flags to disable for scenarios like incognito browsing or performance tuning?
  3. Are there any additional WebView2-specific settings or APIs or DevToolProtocol commands, beyond startup flags, that are recommend for improving Speedometer scores?

Thanks,
--Niro

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files, tests, or implementation entry points. Start by verifying the listed WebView2 startup flags and APIs against the relevant WinUI 2/WinUI 3 documentation and benchmark setup; done would require an agreed, reproducible performance change and supporting guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.