vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Clear out-of-date files in global storage

Open jdneo opened this issue 3 years ago • 3 comments

The extension will store some caches in global storage with each version. Each version will occupy around 15~20MB, which the total size will be quite large when users switched to the pre-release channel.

image

We can consider detect the out-of-date version and remove it.

jdneo avatar Jul 27 '22 06:07 jdneo

I remember @rgrunber mentioned this before: https://github.com/redhat-developer/vscode-java/issues/2285#issuecomment-1126151673 We have already updated to M2E 2.0, so is there any difference on size of the recent versions?

Besides, we can have such logic to clean previous global storage folders.

CsCherrYY avatar Jul 27 '22 06:07 CsCherrYY

so is there any difference on size of the recent versions?

Yes the size is smaller. For example, the size if the folder 1.3.0 is ~24MB, while the size of 1.10.2022072204 takes ~16MB

jdneo avatar Jul 27 '22 07:07 jdneo

As per discussions, maybe there is some feature to have VS Code clear such cached folders at the platform level ? Or maybe there is something we can take advantage of in VS Code API that can mark those folders for deletion on certain staleness criteria ?

rgrunber avatar Jul 27 '22 13:07 rgrunber