microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.76k stars 28.18k forks source link

Webviews load slowly on vscode.dev #213284

Open jonathanyeung opened 1 month ago

jonathanyeung commented 1 month ago

Webviews load slowly on vscode.dev.

I have a custom editor and it takes ~4 seconds to load, while the native editor loads documents immediately. This is not unique to my custom editor, as other webview based extensions such as Markdown Preview Enhanced also take similar amounts of time, even the built-in .jpg image previewer. Furthermore, the amount of time it takes to load does not decrease on subsequent opens of the same file.

The slow loading only occurs on vscode.dev. The webviews load quickly in native VS Code.

Screenshot 2024-05-23 at 11 08 31 AM

Thank you!

Version: 1.89.1 Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685 User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 Embedder: vscode.dev

mjbvz commented 1 month ago

What browser are you using?

jonathanyeung commented 1 month ago

I've tried on both Edge and Safari and the load times are similar for both.

Microsoft Edge Version 124.0.2478.105 (Official build) (arm64)

Safari Version 17.4.1 (19618.1.15.11.14)


Update: some more notes - the Network screenshot I attached in the initial post is from Edge.

I just tested in Chrome - it's faster than on Edge, but still a bit sluggish. Here's a profile from Chrome:

image

Safari is the slowest of the bunch, but given that Safari doesn't even allow opening of folders, the vscode.dev experience on it is already severely hamstrung... so at least for me as an extension developer, I care about that experience the least.

jonathanyeung commented 1 month ago

Hi @mjbvz - is there enough info here for a triage? Thanks.