dexto Posted June 21, 2011 Posted June 21, 2011 My recent project included some automation with Flash UI (no visible controls). So, I had to use Pixel search functions (worked perfectly). During the deployment I noticed that for some reason program was screaming fast with pixel search functions. So fast in fact I got sacred there is a bug in my code. The more surprising thing is that the developing machine has MUCH better configuration!Now whats different then? Tool was deployed on to computers that has FLEX computing enabled. In short computers with Flex have modified IO driver that allows them to function with no hard drive while loading everything computer is trying to access from the image stored on the server. All writes are redirected into a memory. On reboot all writes are discarded and user is starting with fresh machine.So, Directx9 was installed (into ram effectively) before the tool with PixelSearch was ran (from the hard drive) which resulted in crazy speed for PixelSearch. This lead me to believe that PixelSearch function is accessing a storage every time it is ran. In short: Some test showed that PixelSearch function loads DirectX dlls from scratch every time to call the function. Is there a way to load required DLLs for pixel search functions into memory?
jvanegmond Posted June 21, 2011 Posted June 21, 2011 If you use this tool: http://technet.microsoft.com/en-us/sysinternals/bb896645 with a script like: Sleep(10000) $a = PixelSearch(0, 0, 300, 300, 0x123456) Sleep(10000) You can figure out more about how this works exactly. github.com/jvanegmond
dexto Posted June 21, 2011 Author Posted June 21, 2011 (edited) If you use this tool: http://technet.microsoft.com/en-us/sysinternals/bb896645 with a script like: Sleep(10000) $a = PixelSearch(0, 0, 300, 300, 0x123456) Sleep(10000) You can figure out more about how this works exactly. =D I was just using it... and very interesting... no IO.... but if only CPU is holding it back why isn't it taking 100% of cpu available? In fact its taking 0.3% of CPU. Then question is whats holding it back? While 1 PixelGetColor(0, 0) WEnd EDIT: While 1 PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 12345) WEnd Using about 50% of CPU of a single core (1920x1080 area) Edited June 21, 2011 by dexto
Richard Robertson Posted June 21, 2011 Posted June 21, 2011 The difference in your test may be Aero. Aero makes PixelSearch slower.
dexto Posted June 22, 2011 Author Posted June 22, 2011 (edited) The difference in your test may be Aero. Aero makes PixelSearch slower.Ah.. You are absolutely right... Edited June 22, 2011 by dexto
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now