[SVN] Revision 895 (PHP)
Allan Odgaard
allan at macromates.com
Thu May 12 21:19:43 UTC 2005
On May 12, 2005, at 5:55, Kumar McMillan wrote:
>> -- Commented out all the PHP functions again, as they are still too
>> slow for use.
>> Inherent problem in TM at the moment I guess/hope ;-)
> just curious, was this slow on beta 8 as well?
As long as the functions have been there, it has been slow. It was
probably faster before b6 (or at least perceived that way) because of
less overhead with thread communication and more lazy parsing.
> Does anyone know if it would speed things up to define all function
> keywords in one big match instead of how they were, separated by
> category [...]
Probably wouldn't really help. The reason it's slow is:
1) type abstraction (regex works on iterators instead of raw storage)
2) double dispatch using virtual methods to have type neutrality
between NFA and storage
3) no optimizations done in the actual regex lib (like using bitmaps
for character classes, collapsing literal nodes, switching to (sub)
linear time searches for trivial sequences a.s.o.)
Crafting the regular expressions differently may give some, like in the
obj-c case which gave ~25%, but the things above are likely costing a
30-50 times overhead, meaning changing this is the only way to reach
reasonable speeds for the 1000+ PHP functions.
More information about the textmate-dev
mailing list