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

Add delay to autosave #1055

Closed
tonyeung opened this issue Dec 7, 2015 · 10 comments
Closed

Add delay to autosave #1055

tonyeung opened this issue Dec 7, 2015 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@tonyeung
Copy link

tonyeung commented Dec 7, 2015

I have a watch on my source files and while autosaving is great, every change triggers the rebuild process which is pretty crazy. Is it possible to have autosave wait till i stop typing(pause > configurable time) like search box debouncing.

@egamma egamma added the feature-request Request for new features or functionality label Dec 7, 2015
@egamma
Copy link
Member

egamma commented Dec 7, 2015

There is a delay. I think what you are looking for is a less aggressive auto save, i.e., only on focus lost?
You know that you can also turn off auto save.

@b12k
Copy link

b12k commented Dec 7, 2015

Also related with: #353

@tonyeung
Copy link
Author

tonyeung commented Dec 7, 2015

@egamma yes, but what i mean is more like a save when idle, where the idle period is configurable. For example, autosave is triggered 10 seconds after I stop typing.

I currently have auto save turned off, but I miss not having to worry about saving.

@b12k save on focus would also work. A combination of both would be best :D

@tonyeung
Copy link
Author

tonyeung commented Dec 8, 2015

@b12k found an interesting line of code:

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/common/options.ts#L43

/**
 * A number indicating the auto save delay in ms. A time of -1 indicates that
 * auto save indicates that auto save is turned off completly.
 */
autoSaveDelay?: number;

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@bpasero bpasero added workbench file-explorer Explorer widget issues and removed workbench labels Dec 18, 2015
@bpasero bpasero mentioned this issue Dec 23, 2015
6 tasks
@bpasero
Copy link
Member

bpasero commented Dec 23, 2015

I am making progress on this feature request. I would like to avoid showing the dirty indication in the workbench at all cost because imho that is distracting. However this means, if you have configured auto save delay to be 10 seconds, the file will not be saved after that time without indication to the user. Any feedback on this is appreciated.

@bpasero bpasero self-assigned this Dec 23, 2015
@bpasero bpasero modified the milestones: Jan 2016, Backlog Dec 23, 2015
@tonyeung
Copy link
Author

@bpasero I don't know if any indication is needed. This setting isn't something most people are going to change, I think. Those who do make the change should be aware that there is a delay.

If some sort of indication is really needed, perhaps something along the lines of number of dirty files? It would be similar to how the git icon has the number of modified files. The number of modified files sets a precedent. So, its not as if it would get any more distracting for anyone who thinks the dirty dots are.. uh.. dirty.

@bpasero
Copy link
Member

bpasero commented Dec 23, 2015

I just find it interesting that other editors seem to keep all dirty indicators but save after some condition. That is not really a benefit to me, I really like that I also do not have to see any dirty indicators whatsoever because the application takes care of it.

@bpasero
Copy link
Member

bpasero commented Dec 24, 2015

The delay is now configurable from the new files.autoSaveAfterDelay setting.

@tonyeung
Copy link
Author

@bpasero thanks! this will be in the January release?

@bpasero
Copy link
Member

bpasero commented Dec 24, 2015

@tonyeung yes!

@egamma egamma mentioned this issue Jan 6, 2016
59 tasks
@egamma egamma mentioned this issue Feb 1, 2016
97 tasks
@bpasero bpasero added verified Verification succeeded and removed verified Verification succeeded labels Apr 29, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants