I found out part of the reason for the speed difference. 0.99.5.1 runs Get-Command 4 times and 0.99 Beta 2 didn't run Get-Command at all. Originally 0.99.5.1 did it 5 times, but a previous change I made ( see issue "Change how alias is resolved
in TabExpansionUtil.ps1" - also reduces average duration from 0.64 to 0.52 seconds), removed one of the references to Get-Command by using the property ResolvedCommand instead.
I determined the number of calls to Get-Command by using
Set-PSBreakpoint -Command Get-Command
tabexpansion 'dir \\server\c' '\\server\c'
0.99.5.1 runs Get-Command in TabExpansionUtil.ps1 4 times ( I'd list the line numbers, but I doubt if mine match right now with the debug stuff I'm doing ). It does it 1 time for dir and 3 times for Get-ChildItem. I think reducing the number
of time Get-ChildItem gets called would do a lot to speed this up. As it is, I use the old version of PowerTab so much, that the current version noticably slows me down (Even if the functionality is better). If it could be reduce to only 2 calls
to Get-Command, that would be a big benifit.
Thanks for the work you're doing on PowerTab. Great utility and makes a huge difference in the ease of use of PowerShell.