ECHO is very slow

May 20, 2008
12,332
134
Syracuse, NY, USA
This just started happening in the last few days.

Here's v20.
Code:
v:\> timer & do i=1 to 1000 ( echo %i > nul ) & timer
Timer 1 on: 02:32:48
Timer 1 off: 02:32:48  Elapsed: 0:00:00.36

Here's v21.
Code:
v:\> timer & do i=1 to 1000 ( echo %i > nul ) & timer
Timer 1 on: 02:32:53
Timer 1 off: 02:33:00  Elapsed: 0:00:06.99

Without the "> nul" the difference is still great ... .78 vs 8.75.

Here's another one. v20:
Code:
v:\> timer & do f in * ( echo %f > nul ) & timer
Timer 1 on: 02:42:55
Timer 1 off: 02:42:55  Elapsed: 0:00:00.02

v21:
Code:
v:\> timer & do f in * ( echo %f > nul ) & timer
Timer 1 on: 02:42:51
Timer 1 off: 02:42:52  Elapsed: 0:00:00.33

The difference is even more exaggerated in a FOR loop.
Code:
timer & for %f in (*) do echo %f & timer
.04 for v20; 5.73 for v21
 
Another:
Code:
v:\> g:\tc21\tcc /c `timer & echo foo > NUL & echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &ech
o foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo
 foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo
foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo f
oo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL & timer`

Timer 1 on: 03:03:32
Timer 1 off: 03:03:32  Elapsed: 0:00:00.30

v:\> g:\tc20\tcc /c `timer & echo foo > NUL & echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &ech
o foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo
 foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo
foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo f
oo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL &echo foo > NUL & timer`

Timer 1 on: 03:03:37
Timer 1 off: 03:03:37  Elapsed: 0:00:00.06
 
Another:
Code:
v:\> g:\tc20\tcc.exe `timer & echos x & echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& e
chos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos
x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& ec
hos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x
& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x & timer`

Timer 1 on: 03:09:11
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTimer 1 off: 03:09:11  Elapsed: 0:00:00.08

v:\> g:\tc21\tcc.exe `timer & echos x & echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& e
chos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos
x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& ec
hos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x
& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x& echos x & timer`

Timer 1 on: 03:09:20
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTimer 1 off: 03:09:21  Elapsed: 0:00:00.64
 
Not reproducible here:

Code:
[C:\Program Files\JPSoft\TCMD20]timer & do i=1 to 1000 ( echo %i > nul ) & timer
Timer 1 on:  9:30:13
Timer 1 off:  9:30:13  Elapsed: 0:00:00.16

Code:
[C:\Program Files\JPSoft\TCMD21]timer & do i=1 to 1000 ( echo %i > nul ) & timer
Timer 1 on:  9:30:32
Timer 1 off:  9:30:32  Elapsed: 0:00:00.19

Nothing changed in ECHO between v20 and v21. You have something else going on in your system. Do you have the same ANSI setting in both environments?
 
I had changed "Logging" from "History" to "Command", not realizing the implications. I wanted timestamps.
 
Yeah! ... and far more than I wanted. Could history logging be (optionally) given timestamps without that sort of penalty?

Well, we do have a Suggestions Forum for feature requests.

History logging doesn't include timestamps because it would make it impossible to read it with a HISTORY /R. The other types of logging don't have that issue.
 
Well, we do have a Suggestions Forum for feature requests.

History logging doesn't include timestamps because it would make it impossible to read it with a HISTORY /R. The other types of logging don't have that issue.
I figured that. It wouldn't matter here because I use the shralias save files and load them once per login session.
 

Similar threads