Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: load changes to file in the background if file already loaded #53532

Closed
bpasero opened this issue Jul 4, 2018 · 2 comments
Closed

Editor: load changes to file in the background if file already loaded #53532

bpasero opened this issue Jul 4, 2018 · 2 comments
Assignees
Labels
debt Code quality issues perf verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jul 4, 2018

Setup:

  • open 2 files
  • switch between them

Today:

  • we go to disk each time to check if the file on disk has changed

Proposed:

  • show the file instantly without going to disk
  • check for the file having changed in the background

The consequences are:

  • files will load instantly when opened once during the session (good)
  • if the file has changed on disk (and we missed the file event when this happened) it is possible that the editor is updated later (I think that is OK)
  • if the user manages to make the file dirty before this update happens, the risk of seeing a save conflict (not ideal, but this is should not be the 99% case)

Overall this optimizes performance for the 99% case and especially remote editing scenarios where resource access is potentially slow.

@bpasero bpasero added debt Code quality issues verification-needed Verification of issue is requested perf labels Jul 4, 2018
@bpasero bpasero self-assigned this Jul 4, 2018
@bpasero bpasero added this to the July 2018 milestone Jul 4, 2018
@bpasero bpasero closed this as completed in 2902a13 Jul 4, 2018
bpasero added a commit that referenced this issue Jul 4, 2018
bpasero added a commit that referenced this issue Jul 5, 2018
bpasero added a commit that referenced this issue Jul 5, 2018
@bpasero
Copy link
Member Author

bpasero commented Jul 15, 2018

Verify:

  • prepare a setup where you have 2 tabs open (or more) and an external editor to make changes to any of the files
  • switching between the files should work as before
  • make changes to the file externally and verify that switching files shows the content updated (this only works if the files are not dirty in VSCode)

@WilliamStone
Copy link

In some cases user wishes keeping the opened editor content as is and not updating to new content. I think there should be a dialog to notify user of file content change and confirm whether to load changed file. The dialog is per file, and has 4 options of: Yes, No, Yes for all, and No for all, so user can
have fine grained control when needed, and no bother when not needed. And provide a command to let user manually load changed file.

@JacksonKearl JacksonKearl added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Jul 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues perf verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants