Having TeamViewer process running slows down script by a factor of 4

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
colt
Posts: 291
Joined: 04 Aug 2014, 23:12
Location: Portland Oregon

Having TeamViewer process running slows down script by a factor of 4

23 Apr 2018, 17:16

This only seems to happen on my Windows 10 machine as the exact same program runs normally on four other windows 7 machines. Unfortunately I can not post any of the original code but here is a simple program that shows halving on speed depending on if a teamviewer process is running. Is anyone else experiencing this or know why this is happening? This is a huge inconvenience for me as my real program takes about 15 seconds to complete with team viewer running and only 3.5 with it off. When I am heavily using this program I might be running it multiple times per minute.

Thank you.

Code: Select all

#singleinstance  force
SetBatchLines,-1
Gui, Add, TreeView,  w200 h400 
Gui, Add, text, vtext  w200 y+5
t := A_Tickcount
gui show
;FileRemoveDir %A_scriptdir%\temp,1


if(!fileexist(A_scriptdir . "\temp"))
{
	tooltip creating directories
	loop 100
	{
		filecreatedir %A_scriptdir%\temp\temp%a_index%
		loc = %A_scriptdir%\temp\temp%a_index%\
		loop 100
		{
			fileappend test,%loc%test-%A_index%.txt
		}
	}
}

loop, %A_scriptdir%\temp\*.txt,0,1
{

	SplitPath, A_LoopFileFullPath , OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
	parent := OutDir
	stringgetpos pos,parent,\,R
	dt := (A_Tickcount-t)/1000
	stringtrimleft parent,parent,pos+1	
	if(parent != oldParent)
	{	
		tvid := TV_Add(parent . " " . dt)
	}
	else
	{
		TV_Add(parent,tvid)
	}	
	oldParent := parent

}

TV_Modify(tvid, "Vis")

guicontrol ,,text,%dt%
return 

guiclose:
exitapp
return
TinyDancer

Re: Having TeamViewer process running slows down script by a factor of 4

23 Apr 2018, 17:49

you can kill teamviewer when your script starts and launch it when it exists
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: Having TeamViewer process running slows down script by a factor of 4

24 Apr 2018, 04:28

Have a look at Process, Cmd, Priority. It should do what you want.

Hope this helps...
colt
Posts: 291
Joined: 04 Aug 2014, 23:12
Location: Portland Oregon

Re: Having TeamViewer process running slows down script by a factor of 4

24 Apr 2018, 08:31

TinyDancer wrote:you can kill teamviewer when your script starts and launch it when it exists

Thanks for the input, this would do the trick but is really my last resort. Typically I am using my program while controlling one of the other computers over team viewer.
RickC wrote:Have a look at Process, Cmd, Priority. It should do what you want.

Hope this helps...
I just tried this by adding these lines to the top of my program. They elevate my script to real time and put team viewer at low. It seemed to have little to no effect. Team viewer is not taking any cpu time in the task manager and is minimized to the task tray like it would be on startup.

Code: Select all

Process,Priority,,R
Process,exist,TeamViewer.exe
tooltip %Errorlevel%
if(errorlevel != 0)
{	
	Process,Priority,errorlevel,L
}
else
{
	tooltip teamviewer is not running
}
I don't understand how a program that is not using the cpu is slowing down another program.

This might be barking up the wrong tree, but could it be that while teamviewer is running windows 10 antimalware is super paranoid and is taking extra precautions?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: haomingchen1998, MrDoge and 230 guests