On 30. Mar 2007, at 18:14, Charilaos Skiadas wrote:
[...] TextMate needs to load and keep track of all the snippets for activated bundles at all times, since at every key press it needs to determine if one of these needs to be called. So if every bundle created these gozillions of snippets, as I am sure they would like to, I think this would actually have a performance hit for TextMate. Especially for the bundles that don't ship with TM, which are saved in XML format instead of binary, so even just loading them takes some (admittedly not too much) time.
It actually lazy-loads bundle items as needed. It caches the name, scope selector, and activation in an index file which is loaded at startup (though it has to go through the bundles folders to check if any bundles were updated since the index was last generated, which is still a big factor faster than actually having to load each item) -- the index is saved as ~/Library/Caches/TextMate/Bundle Index -- mine is presently just below one megabyte.