Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipch IntelliSense cache taking up too much space. #11925

Closed
H-G-Hristov opened this issue Feb 3, 2024 · 12 comments
Closed

ipch IntelliSense cache taking up too much space. #11925

H-G-Hristov opened this issue Feb 3, 2024 · 12 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. IntelliSense cache Language Service regression A bug that didn't exist in a previous release
Milestone

Comments

@H-G-Hristov
Copy link

Feature Request

I run out of space on my Ubuntu partition. After some investigating I was surprised to find out that it is the ipch files generated by VSCode in .cache.

Some space management would be nice to have. It would be good if the extension warns, displays this information and cleans up whatever is not necessary (if that's possible).

@H-G-Hristov
Copy link
Author

In general I find it problematic when programs create files outside of the working directory and don't notify the user in any way and often all these remain usually after the program is uninstalled, such as configurations, caches, temporary files, etc.

@bobbrow
Copy link
Member

bobbrow commented Feb 5, 2024

Hi @H-G-Hristov,

Please see the C_Cpp.intelliSenseCachePath and C_Cpp.intelliSenseCacheSize settings and let us know if those do not provide the control you are looking for. By default, we pick a common location for cache files because that allows us to manage the total size of caches for all workspaces instead of creating GB's worth of caches per workspaceFolder.

@H-G-Hristov
Copy link
Author

H-G-Hristov commented Feb 8, 2024

@bobbrow Thank you for pointing these settings out.
Main main complaint is that I have been using this extension for over 5 years now and I hand no clue this is happening :) until I run out of space on my Ubuntu partition, which I created too small. It took me awhile to figure out what's was eating my space. And it turned out the cpptools extension was eathing up 30Gb.

image

According to the setting the cache is 5GB but in fact it was 30Gb.

So it would be nice if the extension improves the visibility of this. Maybe via message on start or something. Or maybe it can have a statistics panel, status bar entry, etc.
And if uninstalled would the extension cleanup this cache or leave it behind like so many programs do?
With so many extensions and so many settings it becomes really hard to figure out everything.

@bobbrow
Copy link
Member

bobbrow commented Feb 8, 2024

Did you intend to say Gb (lower-case 'b')? 30Gb < 5GB

If you did mean 30 GB, are you able to reproduce the issue and share some steps how to do it?

And if uninstalled would the extension cleanup this cache or leave it behind like so many programs do?

Unfortunately, we don't get to play a role in the uninstall process. That could be a feature request for VS Code.

With so many extensions and so many settings it becomes really hard to figure out everything.

Yes, we understand and are very much aware that learning settings in VS Code contributes to a steep learning curve for new users. We've tried to document the most important ones, but could probably do better here.

@H-G-Hristov
Copy link
Author

Did you intend to say Gb (lower-case 'b')? 30Gb < 5GB

If you did mean 30 GB, are you able to reproduce the issue and share some steps how to do it?

30GB as in 30 Gigabytes. Sorry.

I don't know how to reproduce it. I use VSCode to open /runtimes in https://github.com/llvm/llvm-project with a CMake preset to build libc++ and also another one to build and link to libc++ a test executable in a separate custom project. I can observe it it will happen again.

Currently:

5.5GB looks more than 5120 but it's probably not a repro.

image

@bobbrow
Copy link
Member

bobbrow commented Feb 12, 2024

Can you share any machine specs? Is it native Ubuntu, or WSL? x64 or Arm? Raspberry Pi or other embedded device?

@H-G-Hristov
Copy link
Author

It is a standard Ubuntu Desktop distro on Dell Inspiron 7567, Intel 7700HQ, 8GB RAM, the partition size is 62.1GB Total.

This is a report from bugs.launchpad.net:

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: xorg 1:7.7+23ubuntu2
ProcVersionSignature: Ubuntu 6.5.0-15.15~22.04.1-generic 6.5.3
Uname: Linux 6.5.0-15-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.driver.nvidia.capabilities.gpu0: Error: path was not a regular file.
.proc.driver.nvidia.capabilities.mig: Error: path was not a regular file.
.proc.driver.nvidia.gpus.0000.01.00.0: Error: path was not a regular file.
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 535.154.05 Thu Dec 28 15:37:48 UTC 2023
 GCC version: gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04)
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sun Jan 28 08:57:34 2024
DistUpgraded: Fresh install
DistroCodename: jammy
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GpuHangFrequency: Several times a week
GpuHangReproducibility: Seems to happen randomly
GpuHangStarted: Immediately after installing this version of Ubuntu
GraphicsCard:
 Intel Corporation HD Graphics 630 [8086:591b] (rev 04) (prog-if 00 [VGA controller])
   Subsystem: Dell HD Graphics 630 [1028:0798]
 NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Dell GP107M [GeForce GTX 1050 Ti Mobile] [1028:0798]
InstallationDate: Installed on 2022-05-01 (636 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
MachineType: Dell Inc. Inspiron 15 7000 Gaming
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.5.0-15-generic root=UUID=19e3ad11-d1ce-49ce-8809-80fc68612eb3 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/30/2021
dmi.bios.release: 1.15
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.15.0
dmi.board.name: 065C71
dmi.board.vendor: Dell Inc.
dmi.board.version: X02
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.15.0:bd08/30/2021:br1.15:svnDellInc.:pnInspiron157000Gaming:pvr:rvnDellInc.:rn065C71:rvrX02:cvnDellInc.:ct10:cvr:sku0798:
dmi.product.family: Inspiron
dmi.product.name: Inspiron 15 7000 Gaming
dmi.product.sku: 0798
dmi.sys.vendor: Dell Inc.
mtime.conffile..etc.apport.crashdb.conf: 2022-05-17T00:40:19.420743
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.113-2~ubuntu0.22.04.1
version.libgl1-mesa-dri: libgl1-mesa-dri 23.0.4-0ubuntu1~22.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:21.1.4-2ubuntu1.7~22.04.7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

@bobbrow
Copy link
Member

bobbrow commented Feb 13, 2024

Thank you. So it looks like nothing out of the ordinary should be needed to reproduce this.

@bobbrow bobbrow added investigate: repro This issue's repro steps needs to be investigated/confirmed and removed question labels Feb 13, 2024
@H-G-Hristov
Copy link
Author

Thank you. So it looks like nothing out of the ordinary should be needed to reproduce this.

I think so. I have had this installation since Ubuntu 22.04 was released. I probably did some tests with vcpkg Vulkan SDK but I only started using it with LLVM's libc++ intensively since around Christmas, which is for about 2 months.

Meanwhile on my macOS everything seems in order (I have used it for about 2 years daily):

Screenshot 2024-02-14 at 12 43 43

@romanholidaypancakes
Copy link

romanholidaypancakes commented Mar 2, 2024

At least there's C_Cpp.intelliSenseCachePath to work with
image

@bobbrow bobbrow added bug regression A bug that didn't exist in a previous release and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Mar 4, 2024
@bobbrow
Copy link
Member

bobbrow commented Mar 4, 2024

I can confirm there is a bug here. We'll get this fixed very soon.

@sean-mcmanus sean-mcmanus added this to the 1.19.5 milestone Mar 4, 2024
@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 4, 2024
@sean-mcmanus
Copy link
Collaborator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. IntelliSense cache Language Service regression A bug that didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

4 participants