Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

alias creation very slow

Aug
4
0
Hello, I am using v12.11.74x64 ( latest )
Alias creation is incredibly slow
~about 2s per 5~6 aliases.
Was not slow in previous versions ( v10 )
Seems it started with the v11 x64 version but I am not sure...
I don't get it.
Here is an example with log:

BTM:

echo [1] %_time%
alias b = list
alias c = copy
alias clean = del *~ *.BAK
alias cp = copy
alias d = del
alias diff = winmerge
alias fl = `dir /h/k/m %1 > dir.lst`
echo [2] %_time%
alias h = %HOME
alias in = `pushd %1 & %2$ & popd`
alias ls = dir/4
alias lt = dir/o:d
alias m = move
alias mv = move
echo [3] %_time%
alias p = pushd
alias ph = pushd %HOME%
alias psys = pushd %HOME%\sys
alias r = rename
alias rm = del
echo [4] %_time%

LOG:
echo [1] 11:49:26
[1] 11:49:26
alias b = list
alias c = copy
alias clean = del *~ *.BAK
alias cp = copy
alias d = del
alias diff = winmerge
alias fl = `dir /h/k/m %1 > dir.lst`
echo [2] 11:49:28
[2] 11:49:28
alias h = D:\lm1
alias in = `pushd %1 & %2$ & popd`
alias ls = dir/4
alias lt = dir/o:d
alias m = move
alias mv = move
echo [3] 11:49:30
[3] 11:49:30
alias p = pushd
alias ph = pushd D:\lm1
alias psys = pushd D:\lm1\sys
alias r = rename
alias rm = del
echo [4] 11:49:31
[4] 11:49:31

Any idea ?
Thanks.
Klobert.
 
Hello, I am using v12.11.74x64 ( latest )
Alias creation is incredibly slow
~about 2s per 5~6 aliases.
Was not slow in previous versions ( v10 )
Seems it started with the v11 x64 version but I am not sure...

Not reproducible here:

echo [1] 15:32:57
[1] 15:32:57
alias b = list
alias c = copy
alias clean = del *~ *.BAK
alias cp = copy
alias d = del
alias diff = winmerge
alias fl = `dir /h/k/m %1 > dir.lst`
echo [2] 15:32:57
[2] 15:32:57
alias h =
alias in = `pushd %1 & %2$ & popd`
alias ls = dir/4
alias lt = dir/o:d
alias m = move
alias mv = move
echo [3] 15:32:57
[3] 15:32:57
alias p = pushd
alias ph = pushd
alias psys = pushd \sys
alias r = rename
alias rm = del
echo [4] 15:32:57
[4] 15:32:57

What is the size of your alias list? (Type MEMORY at the TCC prompt.)

Do you have an alias for ALIAS? Are you running any plugins?
 
Thanks for your prompt reply!
Interesting, that's what I was expecting.
I am wondering what's going on with my system.
No I don't have an alias for alias, so no looping problem in principle...
Here is what I get from MEMORY at TCC prompt:
MEMORY
85 % Memory load
4,083,007,488 bytes total physical RAM
608,727,040 bytes available physical RAM
8,164,122,624 bytes total page file
2,795,450,368 bytes available page file
8,796,092,891,136 bytes total virtual RAM
8,795,874,430,976 bytes available virtual RAM
262,144 characters total alias
261,653 characters free
131,072 characters total function
131,071 characters free
20,000 characters total history

I don't think I have any plugins. How do I check that ?
Thanks.
Klobert.
 
> I don't think I have any plugins. How do I check that ?

Just type PLUGIN at the prompt.

Are you sure this is an ALIAS problem, and not a general problem? What
happens if you run a few SET commands instead of ALIAS? (Internally SET and
ALIAS are identical; they just save the values to different memory blocks.)

Is your system under abnormal load? (If you're running TCMD, the CPU load
is displayed in the status bar.)
 
I have no PLUGIN loaded.
Yes, you are right, it is not alias specific.
I built a set based btm as you suggested
echo [1] %_time%
set ax1="This is an example"
set ax2="This is an example"
set ax3="This is an example"
set ax4="This is an example"
set ax5="This is an example"
echo [2] %_time%
set ax6="This is an example"
set ax87="This is an example"
set ax211="This is an example"
set ax212="This is an example"
set ax213="This is an example"
echo [3] %_time%
set ax31="This is an example"
set ax41="This is an example"
set ax51="This is an example"
set ax61="This is an example"
set ax71="This is an example"
echo [4] %_time%

I get:
set-attempt.btm
echo [1] 16:28:53
[1] 16:28:53
set ax1="This is an example"
set ax2="This is an example"
set ax3="This is an example"
set ax4="This is an example"
set ax5="This is an example"
echo [2] 16:28:55
[2] 16:28:55
set ax6="This is an example"
set ax87="This is an example"
set ax211="This is an example"
set ax212="This is an example"
set ax213="This is an example"
echo [3] 16:28:56
[3] 16:28:56
set ax31="This is an example"
set ax41="This is an example"
set ax51="This is an example"
set ax61="This is an example"
set ax71="This is an example"
echo [4] 16:28:58
[4] 16:28:58

But my load is ok:
Status bar : CPU: 2%, Load: 56%

So what's going on ?
Thanks.
Klobert.
 
From: klobert
...
| Yes, you are right, it is not alias specific.
| I built a set based btm as you suggested

| echo [1] %_time%
| set ax1="This is an example"
| set ax2="This is an example"
| set ax3="This is an example"
| set ax4="This is an example"
| set ax5="This is an example"
| echo [2] %_time%
| set ax6="This is an example"
| set ax87="This is an example"
| set ax211="This is an example"
| set ax212="This is an example"
| set ax213="This is an example"
| echo [3] %_time%
| set ax31="This is an example"
| set ax41="This is an example"
| set ax51="This is an example"
| set ax61="This is an example"
| set ax71="This is an example"
| echo [4] %_time%
...

| But my load is ok:
| Status bar : CPU: 2%, Load: 56%
|
| So what's going on ?

I don't know, though detail observation of your original (test) file (and the "SET" test above) shows that each of your alias names has a trailing space character, due to the space characters which preceeds each equal sign (=). This is not an acceptable practice in TCC (nor, when used with SET, in CMD.EXE). Regardless, I suggest that you not load your aliases one at a time, instead, use the /R ("read definitions from a file" ) option. It is always substantially faster. You can combine it with "here-document" redirection, which would keep all your definitions in the same file. This is what your original file would look like in TCC-style:

--- begin code ---
timer 1 on
alias /r << ENDALIASES
gb list
c copy
clean del *~ *.BAK
cp copy
d del
diff winmerge
fl dir /h/k/m %1 > dir.lst
h %HOME
in pushd %1 & %2$ & popd
ls dir/4
lt dir/o:d
m move
mv move
p pushd
ph pushd %HOME
psys pushd %HOME\sys
r rename
rm del
ENDALIASES
timer 1 off

--- end code ---

On my own system the execution time is a small fraction of a second.
--
HTH, Steve
 
Steve,
thanks for your help and the info on how better dealing with alliases about the trailing space thing.
I tried your code and on my system and it was much better
but still was almost .6s, which seems much slower than what you reported.
But then suddendly I figured it out.
It's the loggging which was causing the slowness.
:)
I had all 3 logs on and my tcc history log was >7M , my cmd log was > 2M
Turning it back on again does not affect speed, so it's only log size it seems.
So seems I need to clean up my logs periodically.
Would be good to have a size limit on logs taking care of by tcc itseff.
Thanks.
Klobert.
 

Similar threads

Back
Top