Skip to content

Limit what you write to workspaceStorage #2110

Closed

Description

@Artur-

My ~/Library/Application Support/Code/User/workspaceStorage folder is 95GB
Pretty much all of this comes from the content of redhat.java folders

There are 802 such folders inside workspaceStorage/*

The biggest folder contains 6.7GB stuff. That contains 64505 files named client.log.2021-08-17.<number> with apparently some trace logging. Not sure if I at one point tried to debug something and maybe caused this. Still seems a bit excessive.

Most folders are around 100MB and all space is consumed by redhat.java/jdt_ws/.metadata/.plugins/org.eclipse.jdt.core/*.index files.

Are you indexing the same dependencies over and over again for each workspace or something similar?

For comparison, my whole ~/.m2 folder is 18GB so using 95GB for workspace storage does not seem reasonable.

Environment
  • Operating System: macOs Big Sur
  • JDK version: 16
  • Visual Studio Code version: 1.60.0
  • Java extension version: 0.81.0
Steps To Reproduce
  1. Code with VS code
  2. Code some more
  3. Code even more

Activity

  1. fbricon commented on Sep 14, 2021

    @fbricon
    Collaborator

    This relates to #185. We might share some JDT indexes between workspaces, but not sure about the m2e stuff.
    The log file proliferation is another (definitely bad) issue, that needs to be fixed too.

    You can safely delete old folders from workspaceStorage/ to save space.

  2. rgrunber commented on Sep 14, 2021

    @rgrunber
    Member

    Most of these would likely be the index file for the Java class libraries. On my example, each one is ~50MB in every workspace and identical (checksum) assuming the exact same runtime is used.

    There's support for a shared pre-configured location, but as far as I remember, JDT doesn't have any locking mechanism, so no support for multiple language server instances writing to the same location.

    We could potentially combine that with some kind of cleanup process on the client to tidy up the workspace storage.

  3. self-assigned this
    on Oct 20, 2021
  4. added 5 commits that reference this issue on Nov 9, 2021
    1d95325
    8f2def4
    55cbe0b
    6a755c3
    604c8eb
  5. added a commit that references this issue on Nov 15, 2021
    dd1fe09
  6. added this to the Mid November milestone on Nov 15, 2021
  7. rgrunber commented on Nov 17, 2021

    @rgrunber
    Member

    This should at least give users the option to configure removal of old unused workspaces for which the standard java language server ran. Long term, I think we need to look at sharing index files by caching them in global storage somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions