Skip to content

Speed up app startup (cache Webview::Availability)#30314

Open
futpib wants to merge 1 commit intotelegramdesktop:devfrom
futpib:cache-webview-availability
Open

Speed up app startup (cache Webview::Availability)#30314
futpib wants to merge 1 commit intotelegramdesktop:devfrom
futpib:cache-webview-availability

Conversation

@futpib
Copy link
Contributor

@futpib futpib commented Feb 18, 2026

Iv::ShowButton() and LocationPicker::Available() each called Webview::Availability() separately (~200ms each on Linux). Replace the per-caller static caches with a single shared cache in Core::CachedWebviewAvailability(), reducing startup from two ~200ms calls to one.

Previous failed attempt at this: desktop-app/lib_webview#136 + #30310

Copy link
Contributor

@ilya-fedin ilya-fedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~200ms each on Linux

the price of converting async api into a sync one with a nested event loop 😭

Iv::ShowButton() and LocationPicker::Available() each called
Webview::Availability() separately (~200ms each on Linux). Replace
the per-caller static caches with a single shared cache in
Core::CachedWebviewAvailability(), reducing startup from two
~200ms calls to one.
@futpib futpib force-pushed the cache-webview-availability branch from 12c00bb to d82bb4f Compare February 28, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants