I have two examples where TM2 is slower compared to TM1.
1.
I think this has been mentioned before but TM2 takes significant longer time to syntax highlight large files compared to TM1. An example is this file from the D standard library:
https://raw.github.com/D-Programming-Language/phobos/master/std/datetime.d
It might be a bit extreme, it's around 34 000 lines of code. If I open that file and then jump to the end of the file. It takes TM1 around 5 seconds until the code has syntax highlighting. In TM2 it takes around 15 seconds.
2.
TM2 is also slower on auto completion for some files. Here is one example:
https://github.com/d-widget-toolkit/dwt-mac/blob/master/dwt/widgets/Display....
If I put the cursor at line 2111 at, type "o" and press escape to do auto completion. In TM1 I immediately get a result. In TM2 I get a result after around 3 seconds.
Is there anything that can be done to increase the performance in these two areas?
On 9 Dec 2013, at 15:55, Jacob Carlborg wrote:
[…] TM2 takes significant longer time to syntax highlight […]
It also does more, like allowing injections and using document content as part of the actual scope.
TM2 is also slower on auto completion for some files […]
This is because TM2 is more flexible in how words are defined so it needs to lookup scope settings for each character when collecting the list of words.
Is there anything that can be done to increase the performance in these two areas?
I don’t know what you want answered here, as you probably already know that a solution can be implemented in an infinite number of ways, so it would be quite an achievement if TextMate 2 alpha has already arrived at the fastest possible implementation.
On 2013-12-12 02:45, Allan Odgaard wrote:
I don’t know what you want answered here, as you probably already know that a solution can be implemented in an infinite number of ways, so it would be quite an achievement if TextMate 2 alpha has already arrived at the fastest possible implementation.
I don't know. There could be answers like:
* I haven't done anything about the optimization so there's much left to do in this area
* I have spent an enormous amount of time already optimizing and it won't be easy getting it any faster
* Since TM2 does a lot more than TM1 did there's a high probability that TM2 will never be as fast as TM1
Since you said that TM2 does more things than TM1 does it seems like, at least in theory, it won't be as fast as TM1.