DT 100% CPU and node_modules

More often than not, DT pretty much hangs when I use VS Code. I’m guessing this is due to indexing node_modules folder. Has anyone else seen and solved this? I think I saw in another discussion that it’s not possible to mark folders as excluded for indexing. Any hints appreciated.

I guess it’s intentional that this folder is indexed, right? What kind of documents does it contain and how many of them?

node_modules: 686,420,352 bytes (897.8 MB on disk) for 79,354 items - that are all code text files.

It’s on my laptop HDD that does need to be indexed, but ‘node_module’ definitely does not need to be.

‘node_module’ are project specific folders that are populated with your npm dependencies. Means can have multiple ‘node_module’ folders in different locations on the disk. Ideally would have an indexer rule with a blanket policy of excluding folders with that name.

Did you index the complete volume? This is actually highly discouraged.

There are no exclusions with indexing. And as just noted, if you’ve indexed your entire hard drive, you shouldn’t. See…

1 Like

Ah, my bad… No, I’m not indexing the entire drive but I am needlessly including those dev folders within the indexing scope. Doh!

Are the folders which you want to index located in the same enclosing folder as the node_modules folder?

No. node_modules is just a folder where project code dependencies are stored for the build system. It’s really easy to move those folders entirely outside the Indexer scope, and I should have realised that before opening this ticket, sorry!!

1 Like

No worries!