cweijan / vscode-office

让VSCode支持预览PDF,Exce和Word等格式, 并增加markdown所见即所得编辑器
MIT License
1.02k stars 93 forks source link

[BUG] Image directory caching from a remote SSH server #264

Open JonasVerbickas opened 9 months ago

JonasVerbickas commented 9 months ago

First of all you have built a great extension.

However, there is an issue when working with large image directories on remote servers via SSH. Whenever I click on an image within a directory containing tens of thousands of images it will load for a LONG time. I'm assuming the extension attempts to download the entire directory of images to the local machine in order to display them in gallery view and allow to switch between images quickly. This creates another issue, from what I can tell, images are being cached by the extension, therefore, after opening a few large directories my MacBook storage quickly fills up even though I open the directories only a few times a week at best. My theory is further supported by the fact that whenever I would disable an extension and click on an image to view it in the native VSCode image editor there is no long waiting time and I can see the image almost instantly.

I presume this could be easily fixed by setting a maximum number of images that would be downloaded from a directory when using SSH e.g. limiting the number of downloaded images to 100 and only after 101st image is selected downloading another 100.