Hi guys
I'm encoutering an issue that doesn't want to solve...
i used 3 macro in .exe , all compiled from the same code, excepted mouse coordinates.
looks like :
label>resetc
let>c=0
label>loopcolor
getpixelcolor> position 1
if good
goto>next
else
add>c,1
if>c>30
goto>next
else
goto>loopcolor
endif
endif
no pause inside the loop of 30 iterations.
this scripts works instantly on windows 7 : the 30 itérations are made in less than 0.2 seconds.With no error.
And on WIndows 10, it takes between 0.8 and 1 second to execute, and the more iteration i add, the more times it takes...
computer with windows 7 :
- cpu : i3 2.27 ghz
-gpu :nvidia gt325M 1gb
-RAm : 4 gb
a very old computer that has also resurrected from many coffee accident...
computers with windows 10 (tested on 2 computers)
-cpu : i5 / i3
gpu : intel HD graphic 520 /intel HD graphic 4400
Ram :4 g for both
it appears that the script execute instantly when i do'nt put the Getpixelcolor inside... so this funcion is clearly having trouble on my win10 computer...
i disabled all graphic enhancements from gpus to make sure, also disabled Game VDR that can cause lags in win10, but still same result...
any idea ? Are GPUs responsible ? Misssing Windows update or something ? What could slower this function ?
Thanks by advance
Edit : tried to use the FindColor function, i have worst results....
GetPixelColor : slower on Win 10 or on different gpu?
Moderators: JRL, Dorian (MJT support)
Re: GetPixelColor : slower on Win 10 or on different gpu?
First:
The syntax of GetPixelColor in your posted code is incorrect. Function parameters in Macro Scheduler are separated by commas not spaces. If you try to run the script as posted you get errors.
Second:
No way to know why your two computers behave as they do. There are so many variables aside from hardware and OS. I have two Dell computers on my desk that were purchased at the same time with identical hardware and with Windows 7 as the OS. I have since updated one of them to Windows 10. Before I ran the following script on each of them, my expectation was that they would run the script in roughly the same amount of time. Turns out the Windows 10 computer runs this script consistently at about 550 milliseconds. The Windows 7 computer runs the script at about 780 milliseconds.
Looking at only hardware and OS would suggest Windows 10 actually runs GetPixelColor> faster. However, there are so many other factors its really impossible to state definitively. At this moment the Windows 10 computer has 83 processes and 254 services running on it. The Windows 7 computer has 74 processes and 184 services running on it. What are each of those doing at any given moment that might affect the time it takes for GetPixelColor> to function?
Out of curiosity I remarked out the GetPixelColor> line. In 20 trials the Win 10 computer runs the script very consistently in 8 or 9 milliseconds. The Windows 7 computer runs the script in 15 or 16 milliseconds about half the time, the other half it reports 0 milliseconds. Explain that!
The syntax of GetPixelColor in your posted code is incorrect. Function parameters in Macro Scheduler are separated by commas not spaces. If you try to run the script as posted you get errors.
Second:
No way to know why your two computers behave as they do. There are so many variables aside from hardware and OS. I have two Dell computers on my desk that were purchased at the same time with identical hardware and with Windows 7 as the OS. I have since updated one of them to Windows 10. Before I ran the following script on each of them, my expectation was that they would run the script in roughly the same amount of time. Turns out the Windows 10 computer runs this script consistently at about 550 milliseconds. The Windows 7 computer runs the script at about 780 milliseconds.
Looking at only hardware and OS would suggest Windows 10 actually runs GetPixelColor> faster. However, there are so many other factors its really impossible to state definitively. At this moment the Windows 10 computer has 83 processes and 254 services running on it. The Windows 7 computer has 74 processes and 184 services running on it. What are each of those doing at any given moment that might affect the time it takes for GetPixelColor> to function?
Out of curiosity I remarked out the GetPixelColor> line. In 20 trials the Win 10 computer runs the script very consistently in 8 or 9 milliseconds. The Windows 7 computer runs the script in 15 or 16 milliseconds about half the time, the other half it reports 0 milliseconds. Explain that!
Code: Select all
Let>counter=0
Label>Loop
Add>Counter,1
GetPixelColor>10,10,res
If>Counter>30
Else
Goto>Loop
Endif
Timer>TTime
MDL>TTime
Re: GetPixelColor : slower on Win 10 or on different gpu?
don't worry for the code, of course i just tried to resume at max on this post, real code has correct syntax, but i wanted to avoid posting 1687 codeline on the thread...
So, if i understood well, you just noticed the opposite ? win10 works better for you?
The only things i observe same as you is the 0 ms runtime of windows 7, that seems to be constant on my side !!
the more attempt i did, the more i think it is related to services and processes as you said, or it might be graphic cards.
However, i lost too much time now and it seems there's no reasonnable way to solve this issue, better avoid to use pixel recognition as much as possible.
So, if i understood well, you just noticed the opposite ? win10 works better for you?
The only things i observe same as you is the 0 ms runtime of windows 7, that seems to be constant on my side !!
the more attempt i did, the more i think it is related to services and processes as you said, or it might be graphic cards.
However, i lost too much time now and it seems there's no reasonnable way to solve this issue, better avoid to use pixel recognition as much as possible.