Open war1644 opened 3 years ago
The download speed increases? I assume you mean decreases?
Deleting a file should be a simple request. Unless VS Code is somehow "zero'ing" the file, there shouldn't be any slowdown, especially not afterwards after the deletion finished.
What OS are you using? How large are those remote files? Anything special in the log files?
System: macos 10.15.7 VS Code Version: 1.54.3
Operation situation:
Expected result: To delete files in the Remote workspace folders list, you should delete them immediately, rather than downloading and then deleting
If it's me who didn't do it properly, please let me know thank you
I'll have to check, but what I think is happening:
Should this be the case, there isn't actually much I can do. I could possibly add a caching system, where I check the hash of the downloaded version and the remote version, but this would require me to keep the downloaded version somewhere in memory (or on your local disk), which has its own problems.
If you move the file into a folder, then delete that folder, I assume it's instant?
Thanks, I have to say that this is a problem caused by my reliance on graphics. I gave up graphical deletion and switched to the watcher method to monitor local changes and overwrite uploads. Thanks again!
The workaround with the folder is nice. However, I wonder if something else is going on as regards to this issue:
- Selecting the file makes VS Code open it in an editor, triggering a download
- If an editor of it is already open, VS Code will refresh the editor (triggering a redownload)
It seems that setting the VS Code preference like so "workbench.list.openMode": "doubleClick"
that big files shouldn't be downloaded. And indeed: If this is is set to doubleClick, files can be selected in the sidebar, but they won't be opened in the editor unless double clicked. They are also not read according to the ssh fs output log.
But when deleting a big file via the context menu, I can see that ssh-fs still tries to read the file regardless of that setting.
@SchoofsKelvin Maybe it's worth to open this issue again? Or should I start a new one?
I'll reopen this one, since it's probably still the same bug. Although I'm afraid it's not the extension reading it before deletion but VS Code itself doing so.
Still the same bug, i just resort to deleting files by command line. Defeats the purpose of an UI, but here we are.
I noticed that when deleting large remote files, the download speed increases. Is the download operation first when deleting remote files? The guess behavior is to download first and then delete?