microsoft / vscode

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

Webviews load slowly on vscode.dev #213284

Open jonathanyeung opened 6 months ago

jonathanyeung commented 6 months 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 5 months ago

What browser are you using?

jonathanyeung commented 5 months 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 5 months ago

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

vs-code-engineering[bot] commented 2 months ago

Hey @mjbvz, this issue might need further attention.

@jonathanyeung, you can help us out by closing this issue if the problem no longer exists, or adding more information.

jonathanyeung commented 2 months ago

Issue still exists.