Welcome!

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

SignUp Now!

tee command cancels colors

The with/without TCSTART difference baffles me. What do you get from these?

Code:
v:\> timer (do i=1 to 10 (%comspec /c))
Timer 1 on: 13:11:43
Timer 1 off: 13:11:44  Elapsed: 0:00:00.558

v:\> timer (do i=1 to 10 (%comspec /i /c))
Timer 1 on: 13:11:51
Timer 1 off: 13:11:52  Elapsed: 0:00:00.403

I don't think being in TCMD should make any difference.
 
The with/without TCSTART difference baffles me. What do you get from these?

Code:
e:\utils>timer (do i=1 to 10 ("%comspec" /c))
Timer 1 on: 17:02:04
Timer 1 off: 17:02:07  Elapsed: 0:00:02.890

e:\utils>timer (do i=1 to 10 ("%comspec" /i /c))
Timer 1 on: 17:02:33
Timer 1 off: 17:02:36  Elapsed: 0:00:02.773

Joe
 
Code:
e:\utils>timer (do i=1 to 10 ("%comspec" /c))
Timer 1 on: 17:02:04
Timer 1 off: 17:02:07  Elapsed: 0:00:02.890

e:\utils>timer (do i=1 to 10 ("%comspec" /i /c))
Timer 1 on: 17:02:33
Timer 1 off: 17:02:36  Elapsed: 0:00:02.773

Joe
That seems to me like a long time for TCC to just start and stop, especially with "/i". I can't explain it. It does explain the times your in-process vs. out-of-process pipe tests.
 
You can workaround this difficulty by using in-process pipes. It also works around other things getting lost when a pipe instance of TCC momentarily removes the console's ENABLE_VIRTUAL_TERMINAL_PROCESSING mode (like tabstop settings and underlining). Much to my surprise, and contrary to the help, in-process pipes seem, almost always, to be faster than out-of-process pipes, sometimes a lot faster. Here are a couple timing comparisons. If others compare times, I'd like to hear the results.

It's not surprising that the in-process pipes are faster with trivial pipe processing, since they don't have the overhead of starting another process. In the real world of large pipe transfers, a child pipe process (running on a separate core) is going to be faster -- usually much faster.
 

Similar threads

Back
Top