Skip to content

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

Closed

Description

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.

Activity

  1. bpasero commented on Jul 15, 2018

    @bpasero
    ContributorAuthor

    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)
  2. WilliamStone commented on Jul 17, 2018

    @WilliamStone

    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.

  3. locked and limited conversation to collaborators on Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtCode quality issuesperfverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions