Sublime Forum

How many snippets file can I put into User folder?


When I put more thant 10 million files within 400 folders. Sublime just cannot start. How many files can I put the most with16G RAM?



I don’t have an answer to your question but I suspect you’re trying to use Sublime Text for something it isn’t designed for.
May I ask you why do you want to use 10 million snippet files? What are you trying to achive?

1 Like


Just write some code snippets to save time.
500000 snippets can start but I want to know the upper bound.



There is no hard upper bound, just however much your hardware is able to support and how long you’re willing to wait/how much you’re willing to deal with an unresponsive UI.



Can I create many folders to save snippet to make sublime run more fast instead of put all in one folder?



But seriously, why do you need that many snippets ? That’s excessive in the extreme.

1 Like


Yes.More than that take too much RAM.Maybe need in the future.



I want to know if I have 256GB RAM how many files can I save?



I’m not quite sure of the question you’re asking because ealier you say

and then you’re talking about 256GB of RAM:

but I’ve just had a look at my snippets and they vary between 200 and 1000 bytes, so 0.2 to 1k. I don’t know how much space they take up in memory when they’re loaded into Sublime, I’m guessing they’ll only be loaded as neccessary or perhaps there’s some caching method going on, they’re scoped too, which will reduce overheads.

If you’re talking about a 256Gig hard drive, well the answer is 5x256 x10⁹ snippets max or 256x10⁹ min. Should keep you going for a while. :smiley:

Even if all the snippets are loaded into memory and they take up 100 times more space in memory (as machine instructions) that still gives you 256x10⁷ snippets. Obvs there’s got to be room for ST3 and all your other processes, but the english language only contains 50k words, your average computer language (pulling a number out of the air) 100, 200. I think C has about 20 keywords. MindF*ck has two. But I digress. I’m going to stick my neck out and say I think you’ll be fine for the first 6 months of ST use, after six months see how things are looking ?
:thinking: :star_struck:

Ps Sorry it was Brainf**k

1 Like


Thank for reply.(The problem is trigger words.If trigger words less than 7 more than 1 with printable character,then the number of possible snippets is huge)
If I put more than about 1 million snippets(fix length ,all the same) . Then I cannot normal start sublime. (If I put 200000 snippets I can see task manage show sublime take much memory and CPU when it started,and then down later.)
I want to know If I add RAM space like from 16GB to 64GB and upgrade my CPU allow me to put more snippets and start sublime normally.And how much more can load?



That, I have no idea about, I’m just a user (and a noob at that)

But having said that, is the goal (of your question) to get a specific answer to your question?:
Or is this line of questioning trying to work out the performance of this editor vs other editors; so that you can decide which one you should use ?

If it is the latter; how do the other editors perfom when you run the same tests? If they perform better or worse, there’s your answer as to which one you should use, if those are your circumstances/criteria you have to work with.

However if the reason for your question is the former, then everything I’ve just said is totally useless, and hopefully someone else can jump in a save me/us :smiling_face_with_three_hearts:

Good luck L

Ps Just a final thought, I guess the folks at Sublime have designed it with some parameters in mind ie what is the upperbound for the amount of snippets the design team thought that someone might need. 200,000 snippets is a lot of snippets…

1 Like


…Not require specific answer…just want to know how to use more snippets.
Actually I haven’t use that much snippets.I wrote a program generate that much snippet templates for testing.So I have this question.

Other editors use different methods to create snippets(sublime is easy enough for me),maybe test later ha…



Can you explain a little bit better why it is you need to have 10 million code snippets? You say “to save time”, but I’m having a hard time grasping how you could even remember 10 million different tab sequences to trigger the snippets in the first place. It seems like trying to narrow in on the correct one would take vastly more time than it would take to just enter the text you want in the first place.



Just want to know the if thee is an answer.There maybe someone need in some time.


#16 has 209169 .sublime-snippets files in it… :joy:

1 Like


So there maybe some occasions use that much snippets,like game develop.



Maybe it is a filesystem I/O bottleneck? You should try to pack your snippets to zip-archive with .sublime-package extension, put it to the Installed Packages folder and look at any difference.

Also, if your snippets are just list of class/method names - you probably should try to generate completions (that can be in one file) instead of snippets.

1 Like


Personally why I don’t use completions is (if I’ve understood correctly) I’ve got remember what I want in that file, and edit a long list where as with a snippet I can create one on the fly with a couple of keystrokes (now)…

1 Like


The main issue would be that in order to be a part of the completion system, the contents of the files has to be loaded into memory, and since there’s no artificially constrained upper bounds on the number memory is a finite resource, there is a finite number of them which can be defined before it’s no longer sustainable.

Regarding the differences between snippets and completions, that’s summarized here:

Since both are meant to add items to the autocomplete panel to make common sequences or blocks of text easier to write, the idea that one would need so many of them that the limit is even something to worry about is a strong suggestion that someone is doing something wrong, all else being equal.

1 Like


Just write some services for services quicker.