File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/vs/workbench/contrib/notebook/common Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -218,16 +218,18 @@ export class NotebookFileWorkingCopyModel extends Disposable implements IStoredF
218
218
}
219
219
} ) ) ;
220
220
221
- this . configuration = {
222
- // Intentionally pick a larger delay for triggering backups when
223
- // we are connected to a remote. This saves us repeated roundtrips
224
- // to the remote server when the content changes because the
225
- // remote hosts the extension of the notebook with the contents truth
226
- backupDelay : 10000
227
- } ;
221
+ const saveWithReducedCommunication = this . _configurationService . getValue ( NotebookSetting . remoteSaving ) ;
222
+
223
+ if ( saveWithReducedCommunication || _notebookModel . uri . scheme === Schemas . vscodeRemote ) {
224
+ this . configuration = {
225
+ // Intentionally pick a larger delay for triggering backups to allow auto-save
226
+ // to complete first on the optimized save path
227
+ backupDelay : 10000
228
+ } ;
229
+ }
228
230
229
231
// Override save behavior to avoid transferring the buffer across the wire 3 times
230
- if ( this . _configurationService . getValue ( NotebookSetting . remoteSaving ) ) {
232
+ if ( saveWithReducedCommunication ) {
231
233
this . save = async ( options : IWriteFileOptions , token : CancellationToken ) => {
232
234
const serializer = await this . getNotebookSerializer ( ) ;
233
235
You can’t perform that action at this time.
0 commit comments