On 1 Jun 2005, at 19:33, Kumar McMillan wrote:
nice! this is really cool, Mats. Works great too. I love code completion.
It's kind of nice actually, and now I want it in every language I'm working in !! (some already in progress)
One suggestion : since the phpcc.lookup.php file has 3,000+ lines of array declarations, try regenerating it all as one big array instead. I think you will notice a speed increase. What I mean is, instead of:
$_LOOKUP = array( ); $_LOOKUP["abs"] = array( "methodname" => "abs", ... ); $_LOOKUP["acos"] = array( "methodname" => "acos" ... );
make it :
$_LOOKUP = array( 'abs' => array( 'methodname' => 'abs' ... ), 'acos' => array( ... ), ... );
because otherwise, the PHP parser would be looking up '_LOOKUP' in the global symbol table 3,000 times instead of once :(
Cheers, didn't know about that one. Will try to do so then. I'm also playing with the idea of loading smaller subsets of the array based on the first letter of the (completed) word. So in the case of completions of array* we would load the A file (with only functions starting with A) which is 36Kb rather than 1.1Mb. Should speed things up as well.
I am on a dual G4 here anyway so I only notice a slight lag when it first hits the lookup script ... still very usable.
Mostly concerned about G4 laptops, so I'd be very interested in users with them. (got iMac G5 myself)
well, when a few other people have tested it, I think you should definitely add this to the Bundles repos
Yes, this together with some other functions in the "development lab", full PHP-Smarty support and more should make developing in PHP much better and faster.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -