Sublime Forum

Indexing extremely slow, each worker processing few files

#1

Hi, I have notices that my sublime text will hang for about half a second at a time, every several seconds. This is extremely annoying while typing. It appears to be correlated with when a new worker is spawned to index files. I use the index quite frequently and it is one of the keys reasons I use sublime so I don’t want to disable it. This would not be a problem if workers were not spawned very often, but for some reason, each worker only processes 2-50 files instead of the 4096 it claims it will process. I think this is a bug. Here is an example of my logs:

indexing [job 768]: spawning 2 workers to process 4096 / 11971 files
indexing [job 768]: indexed 4 files
indexing [job 769]: spawning 2 workers to process 4096 / 11969 files
indexing [job 769]: indexed 12 files
indexing [job 770]: spawning 2 workers to process 4096 / 11959 files
indexing [job 770]: indexed 5 files
indexing [job 771]: spawning 2 workers to process 4096 / 11956 files
indexing [job 771]: indexed 7 files
indexing [job 772]: spawning 2 workers to process 4096 / 11951 files

0 Likes

#2

Do you have something running on your system that periodically changes files in your project? Having a folder that includes some sort of cache is also an easy way to get this behavior.

0 Likes

#3

Nope, once indexing eventually finishes, everything is fine indefinitely. My workflow is heavily based on git worktrees, I create a new worktree for each feature I add, so I end up indexing “new” projects frequently.

0 Likes

#4

Hi there,

Found this thread online and made an account just to add my +1 that this bug is happening for me as well.

I get the same behavior where only a handful of files get processed from the 4096. I work in a multi-million-line codebase with many other programmers. I feel that I can sometimes get this problem to go away by deleting my index folder in %localappdata%\sublime text 3, but I’m not sure if it actually helps.

0 Likes