0
Files
src/android_webview
Torne (Richard Coles) dcd4117a44 webview: update constructor performance metrics.
Add new metrics to properly distinguish the *three* distinct cases we
can encounter while creating a WebView instance.

The existing metrics relied on "has the global Chromium initialization
already run" to distinguish "cold" and "warm" cases, and these cases
were being interpreted as "whether this is the first instance of WebView
or not".

There are actually three cases: it's possible for the global Chromium
initialization to have already run *before* the first WebView was
constructed. The existing metrics categorized this as "cold", but the
first instance still takes longer to construct than subsequent
instances even in this case, making it hard to interpret the metrics
correctly.

Instead, define three separate histograms for the three cases. We
continue to log the old histograms as well for now to allow for
cross-version comparisons.

The descriptions of the existing metrics are also updated to clarify
their limitations and suggest consulting the new metrics instead.

Bug: b:373630656
Change-Id: Id927276f2bb6327bec3764e1fe6dd6abb2ffb1ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108730
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Richard (Torne) Coles <torne@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Auto-Submit: Richard (Torne) Coles <torne@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1420668}
2025-02-14 12:12:54 -08:00
..
2025-02-06 08:34:49 -08:00
2025-02-13 16:20:27 -08:00

Android WebView

Android WebView is an Android system component for displaying web content. WebView (and the related Android classes) are implemented by the code in the //android_webview/ folder.

This directory contains the Android WebView implementation, as well as the implementation for the AndroidX Webkit support library.

Overview for Chromium team members and contributors

Please see WebView Architecture.

Want to use WebView in an Android app?

Please consult our API documentation and app development guides:

Want to build and install WebView on a device?

See our Chromium developer documentation.

Public mailing lists