TCC idling

Jun 7, 2008
121
0
#1
Hi

Just noticed something

Running
TCC 13.01.31 Windows XP [Version 5.1.2600]

I have 6 sessions of TCC open, PC is not doing anything and in Process Explorer, all 6 sessions are consuming anything between 0.39% to 3.10% of CPU time.
Nothing substantial, but not zero.
CMD.EXE seems to be 0%.

Is TCC "doing" anything, by default, when idle?

Cheers

Stephen Howe
 

rconn

Administrator
Staff member
May 14, 2008
10,550
97
#2
> I have 6 sessions of TCC open, PC is not doing anything and in Process
> Explorer, all 6 sessions are consuming anything between 0.39% to
> 3.10% of CPU time.
> Nothing substantial, but not zero.
> CMD.EXE seems to be 0%.
>
> Is TCC "doing" anything, by default, when idle?
If you're running TCC stand-alone (i.e., not in a Take Command tab window),
all it's doing is sitting inside a Windows WaitForSingleObject API call
waiting for you to press a key. There may also be some background threads
running depending on what else you've been doing.

If you're running TCC in a tab window, there's an enormous amount of stuff
going on in the background, mostly to keep the tab windows updated.
 
Jun 7, 2008
121
0
#3
If you're running TCC stand-alone (i.e., not in a Take Command tab window)
I am. I notice even when I start TCC and then do nothing, CPU time is taken up. In contrast CMD.EXE takes nothing. A single "DIR" on a big directory in CMD, and I see activity, and then nothing. At this point I got interested.
Using DEPENDS.EXE, I can see that CMD.EXE makes a call to WaitForSingleObject.

If I use Process Explorer, bring up properties for CMD.EXE & TCC.EXE,
switch to Thread Tab, I see

2 threads for CMD.EXE in
CMD.EXE+0x5046 State: Wait:WrLpcReply
NTDLL.DLL!RtlConvertUiListToAPiList+0x295 State: Wait:Suspended
but the interesting thing is the Context Switches is not increasing, it is a fixed number

I see

3 threads for TCC.EXE in
TakeCmd.DLL!AllocDup+0x1a0 State: Wait:DelayExecution or Ready
TCC.EXE+0x3c1d State: Wait:UserRequest or Ready
TCC.EXE+0x2ec0 State: Wait:WrUserRequest
but here the Context Switches is constantly increasing

I am not sure what all this means.
I have drawn a blank searching on WaitForSingleObject and CPU cycles

Cheers

Stephen Howe
 

rconn

Administrator
Staff member
May 14, 2008
10,550
97
#4
> 3 threads for TCC.EXE in
> TakeCmd.DLL!AllocDup+0x1a0 State: Wait:DelayExecution or Ready
> TCC.EXE+0x3c1d State: Wait:UserRequest or
Ready

> TCC.EXE+0x2ec0 State: Wait:WrUserRequest
> but here the Context Switches is constantly increasing
WAD. TCC doesn't do an infinite wait in WaitForSingleObject. It waits 10
ms, then checks for a ^Break and gives up the rest of its time slice, and
loops back to the WaitForSingleObject. Even if you're running an 8088 at
4Mhz, you're never going to be able to detect any overhead here.

Unlike CMD, TCC is not actually a console app. It is a hybrid console/GUI
app, and has its own message loop (CMD does not). I suspect you either have
something in your system blasting out a stream of messages to the TCC
sessions (which TCC has to process), or you have a third-party app that is
injecting code into the TCC sessions. What does Process Explorer show for
the dll's in a TCC session?