Sublime Forum

How many snippets file can I put into User folder?

#8

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

0 Likes

#9

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

0 Likes

#10

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

#11

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?

0 Likes

#12

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

#13

…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…

0 Likes

#14

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.

2 Likes

#15

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

0 Likes

#16

https://packagecontrol.io/packages/Unity%20Completions has 209169 .sublime-snippets files in it… :joy:

1 Like

#17

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


0 Likes

#18

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

#19

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

#20

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

#21

Just write some services for services quicker.

0 Likes

#22

I wouldn’t expect it to start. I wouldn’t expect ANY editor to start.

1 Like

#23

Yeah,So do I,too much time resources take.

0 Likes

#24

What was that suppose to mean?:smiley:

0 Likes

#25

Ok,completion is not snippets.What’s the differences.

0 Likes

#26

I just used plugin,syntax,snippets. Three ways of improve coding experiences.Seriously,how to use completion?I have asked another question on another platform and no one response.Like Anaconda,
Completion appears list of possible words base on your prefix words automatically.Snippets doesn’t,Right?
It’s some settings are good.But don’t know how to add personal features on it.:cold_face:

0 Likes

#29

As many as free space from your machine.Then you can resue the code with plugins and snippets or themes.
1.Reuse the code.
2.Delete not use completion
3.Right click popup menu or use it with hotkeys with plugins

Faster CPU/RAM will get faster feedbacks/responses from Sublime Text Editor.Usually with less than about 5~10 minutes.

0 Likes