Win-10 performance with AHK

Talk about anything
colmik
Posts: 83
Joined: 11 Mar 2014, 18:21

Win-10 performance with AHK

30 Mar 2016, 14:19

Just as a matter of interest - has anybody noticed a performance hit on AHK when "upgrading" to Windows-10?

I run Windows-7 on a laptop, and I often play Miniclip Pool on http://www.miniclip.com/games/8-ball-po ... player/en/. I have written a script that helps me with various aspects of the game, and among other things, it reads my opponent's number, so I know if I have played him before. Each player is assigned a number which appears at the top of the screen, mine on the left and his (or hers) on the right, but it doesn't appear in the page source - it's just a picture of a number - so to read the number with a script, I have ten tiny captured images, one of a "0", one of a "1", etc, then for each digit location, I try each of them, searching an area only a few pixels bigger than where the character should be, till one of my images matches. As it reads each digit, it puts the mouse cursor on that digit, so it's easy to see how long it takes. I haven't timed it electronically, but subjectively, I would say that it reads an 8-digit number in about half a second.

When I eventually acceded to Microsoft's nagging to upgrade to Win-10, I found that my script was reading (subjectively) two digits per second. As I said, I didn't actually time it, but it was certainly very much slower. I can't say how it affected the general running of AHK because I went back to Windows-7 after only a day, for an unrelated reason.

My ten captured digits are held in tiny files, so there may be a difference between the OS's in whether they load the files from disk each time, or whether they keep them in memory. It may even be settable somewhere.

Has anybody else noticed a difference when going from Win-7 or Win-8 to Win-10?

Incidentally, I'd like to warn anybody going from Win-less-than-10 to Win-10. The first time you boot Win-10, it will ask for a password. this is the same password as on your Microsoft account. I didn't use a password on Win-7, so when I was asked for the password, I didn't know what it was. I have all my user names and passwords in a password vault on my PC - but I couldn't get into Windows. I do have a backup copy of the vault on a memory stick - but I still need the PC in order to read it, and I don't have a smartphone, so I had to get into the car and go to the local library to reset my Microsoft account password with one of their computers, so that I could answer the question.

Another thing - if you go from Win-7 -> Win-10 -> Win-7 again, you will find many, many invalid entries in your scheduler. Lots of people have reported this. I had 94 of them. Have fun with that - I certainly did!
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Win-10 performance with AHK

30 Mar 2016, 15:08

i've had no problems at all going from win8.1 -> win10

the only hiccup was during the win10 OS install, it hung at 32%, but it was due to graphics drivers problems with my laptop. i needed to turn off NVIDIA Optimus in the BIOS

lexikos
Posts: 9631
Joined: 30 Sep 2013, 04:07
Contact:

Re: Win-10 performance with AHK

31 Mar 2016, 01:54

Did you have Aero (desktop composition, glassy effects) enabled on Windows 7? If not, that could explain why ImageSearch performed well. Desktop composition affects ImageSearch and PixelSearch quite severely on some systems, and it cannot be disabled on Windows 8 or above.
The first time you boot Win-10, it will ask for a password. this is the same password as on your Microsoft account.
Only if you tell it your Microsoft account. If you never tell it which Microsoft account is yours, it won't know. As with Windows 8/8.1, there is always the option (in Windows first-time setup) to sign in without a Microsoft account, but you may have to look closely to find it, and ignore the "recommendations" that appear on screen.
Guest

Re: Win-10 performance with AHK

31 Mar 2016, 14:35

Ah yes - Aero could have been the culprit. I can't remember now the effect I saw, but I discovered serious performance degradation on the first OS to introduce Aero. I think it was XP. I switched Aero off, and have avoided it since, so you're probably right on that score. I did notice it on Win-10 (with some distaste), but it's disabled on my Win-7.

About letting Win-10 know about my MS account, however, I didn't do that. I wasn't aware of even having one. I must have created it at some point, because I had the details in my password vault, but I had not used it for so long that I had forgotten its existence, so I can only assume that Win-10 got that info from Win-7 when I upgraded. I certainly didn't tell it during the upgrade process. It took a while talking to MS support to be convinced that the account password would also be my Windows password. I didn't want to drive home from the library, then find it didn't work.
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Win-10 performance with AHK

31 Mar 2016, 16:55

Vista was the first OS to introduce Aero. "Aero" was really just the glassy effects. The real culprit is the DWM (Desktop Window Manager) aka Desktop Composition that Lexikos said.

However, in many cases, Aero/DWM actually INCREASES performance, depending on how you are doing your Pixel/Image searches. With Aero off (or with WinXP), I have to PrintWindow and then BitBlt before I could do GetPixel on a window that was hidden behind another window. With Aero on, I can just GetPixel directly, during a 150ms process into a 10ms process.

I would guess if you used GDIP ImageSearch you would see similar speedups. My commercial script scans for many images over many windows and I require my users to have Aero turned on for the performance gain


Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 51 guests