coder / code-server

VS Code in the browser
https://coder.com
MIT License
68.6k stars 5.63k forks source link

Arg: "--disable-update-check" results in Slower Load time of Code Server #6999

Closed kunal-testlify closed 5 days ago

kunal-testlify commented 2 months ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Launch instances of Code-server with --disbale-update-check and one without it
  2. Compare total time to load

Expected

Passing the arg shouldn't be adding any delay to loading of VSCode.

Actual

From my observation the culprit could be loading of index.html & fake.html file being fetched which adds upwards of 2s+ delay

Logs

No response

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

This cannot be tested in GitHub Codespaces

Are you accessing code-server over a secure context?

Notes

No response

code-asher commented 2 months ago

When you say time to load, you mean the browser right? The only thing that flag does is disable an update check, and the update check runs asynchronously.

index.html and fake.html are used in web views (for example when viewing extension details), but they have nothing to do with the update check. If you are seeing those load then maybe in one test a web view was displayed but not in another? Or the time difference could maybe be explained by caching.

kunal-testlify commented 2 months ago

Hey @code-asher you replicate the issue locally using the docker images. Run one container with the flag to disable update check and one without it. The container with the flag fetches index.html and fake.html on page load whereas the other doesnt. (Verified in Network tab of the browser). When deployed on platform like GCP/etc, the inital delay to show the VSCode editor can increase upto 2s.

code-asher commented 2 months ago

I am not sure why it would be different in an image but I tried it (docker run --rm -p 8080:8080 codercom/code-server --disable-update-check --auth none) and I see those files loading both with and without the flag (because of the welcome page, which is using a web view).

kunal-testlify commented 5 days ago

Sorry for the late update. Closing this issue as I think that might be the case along with inconsistent server resp time on my hosted env.