Sublime Forum

Sublime text is not responding for a while proportionaly to the number of files contained in the project ? What can we do?

#1

Hi Everybody,

I m having some trouble to manage some projects which involved a lots of files.
Each time I open these projects I have Sublime Text not responding for a while.
The bigger the project is the longer I have too wait but I am to impatient for that.

Is there a way to handle big projects and avoid this issue ?

best regards

david

0 Likes

#2

Without more info it is hard to tell exactly what issue you were running into.

You may want to checkout dev build 3125, as weā€™ve made some tweaks and added functionality for seeing what the indexer is doing with your codebase.

0 Likes

#3

Hi wbond,

Thanks for the update,

I downloaded your latest update 3126 - I believe - I ll check what s going on with that new version.

Best regards

david

0 Likes

#4

Morning,

I don t have the issue so far, but I got this error when opening sublime_text :
Traceback (most recent call last):
File ā€œpackage_control.package_disabler in C:\Users\dav\AppData\Roaming\Sublime Text 3\Installed Packages\Package Control.sublime-packageā€, line 207, in delayed_settings_restore
TypeError: argument of type ā€˜NoneTypeā€™ is not iterable

Do you know what am I suppose to do with this information ?

0 Likes

#5

Head over to https://github.com/wbond/package_control/issues/new and follow the directions.

0 Likes

#6

I was having lots of trouble myself, and it turns out that Sublime is spending time watching files, and you can give it a hand by telling it not to watch by putting this in your preferences

"binary_file_patterns": [
  "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip",
  "node_modules/**",
  "bower_components/**"
]

node_modules typically contains a huge number of files. You could identify similar folders in your project and exclude them too. It made a huge difference to my performance

1 Like

#7

Hi Guys,

@mikkelking, thanks, I haded certain directory in the folder_exclude_patterns in the project settings and it works better.

@wbond, do you think we can have some sort of alerts when a directory contains too much files or files are too big ?
the goal will be to avoid sublime text to parse entirely directories which are too big. a bit like github does when there s more than 1000 files in a directory.

Best regards

0 Likes

#8

Having more than 1,000 files in a folder shouldnā€™t be an issue by itself ā€“ any issues related to that should ideally be solved by Sublime Text, rather than sending out alerts. I would need more information about what symptoms are being seen.

To my knowledge, the only performance issues with a large number of files are:

  • When a folder has an extremely large number of files in it (over 1k), some machines have trouble when expanding/collapsing the folder in the sidebar. Iā€™m in the process of rewriting the sidebar control to resolve this.
  • When a project has around 200k+ files in it, some users experience some lag in the Goto Anything quick panel. I havenā€™t yet looked into solutions for this, but we may need to tweak the implementation a little to make this more fluid.

Weā€™ve recently made some tweaks to the indexer so out-of-the-box on laptops users experience less CPU usage.

So, if you can provide some more details about your situation, we should be able to find a solution.

1 Like

#9

Hi @wbond,

Thanks for the follow up.

I do have 8 directories with 11k files and 1 with 22k files in it and each files are 32KB.

The main issue I faced is when I launch sublime text, the editor is working for a couple of minutes and then freeze as it is parsing the files within the directories.

If I wait the editor become available after a while but that s too long.

Thanks for help.

PS : Why is SideBarEnhancements is not part of https://packagecontrol.io ?
PSS : What is your best base settings for you (theme, plugins,ā€¦)

david

0 Likes

#10

The folder with the 22k files is likely the issue. It isnā€™t parsing the files during that time, but rather a very large number of files hits a performance edge case in the implementation of the sidebar tree control.

0 Likes

#11

What can I do ?

0 Likes

#12

It seems youā€™ll have to wait until we finish rewriting the sidebar implementation.

2 Likes

#13

Are you developing sublime text? I thought only 1 person - the author do it :slightly_smiling:

0 Likes

#14

Iā€™ve been working for Jon on Sublime Text since January, so yes. :slightly_smiling:

0 Likes

#15

Can you tell some inside info about the future of sublime text? :slight_smile: Why it is not developed by a dev team? Itā€™s too long to develop and fix alone

0 Likes