1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ECHO is very slow

Discussion in 'Support' started by vefatica, Apr 28, 2017.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    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
     
  4. thorntonpg@gmail.com

    Joined:
    Jul 4, 2008
    Messages:
    189
    Likes Received:
    0
    v21

    c:\program files\jpsoft\tcmd21> timer & do i=1 to 1000 ( echo %i > nul ) & timer
    Timer 1 on: 21:22:46
    Timer 1 off: 21:22:46 Elapsed: 0:00:00.50
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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?
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I had changed "Logging" from "History" to "Command", not realizing the implications. I wanted timestamps.
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    And you got them. Slowly.
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    Yeah! ... and far more than I wanted. Could history logging be (optionally) given timestamps without that sort of penalty?
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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.
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I figured that. It wouldn't matter here because I use the shralias save files and load them once per login session.
     

Share This Page