Posts on Medium Nov 13, 2025

Making Android WebView 2.5× Faster (And Proving It with Data)

Article Summary

Timur Borgalinov from Uzum Market turned Android WebView from a performance black hole into a predictable, measurable component. His team achieved 2.5× faster load times with data to prove it.

WebView screens are notorious for unpredictable performance: sometimes instant, sometimes a 5-second white screen. Borgalinov's team built a complete measurement and optimization pipeline around WebView prerendering, visual readiness detection, and automated metrics collection.

Key Takeaways

Critical Insight

The team transformed WebView from an unmeasurable black box into a performance-managed component with clear metrics, saving thousands of user hours and improving conversion rates.

The article reveals specific thresholds and gotchas they hit with white UI designs, SPA skeleton loaders, and auth cookie handling that most teams miss.

About This Article

Problem

Android WebView takes a long time to initialize, especially the first time it runs. Developers can't easily tell when users actually see content on screen. onPageFinished() either fires too early or too late, making it hard to figure out if slowdowns come from the network, backend, frontend, or Chromium itself.

Solution

Borgalinov's team created WebViewReadyDetector, which renders the WebView offscreen as a small bitmap and watches for non-white pixels to cross a 2% threshold across multiple frames. This gives a concrete TIME_TO_VISUAL_READY_MS metric that doesn't depend on onPageFinished() timing.

Impact

Using a hybrid prerendering strategy with prerenderUrlAsync and an invisible WebView fallback cut load times by 2.5x for the slowest 10% of users. Across 5 million screen opens in their payment and onboarding flows, this saved about 2,800 hours of user attention per month.

Recent from Posts on Medium

Related Articles