corgano Posted May 15, 2017 Share Posted May 15, 2017 I was programming and suddenly my script started going much slower than usual. I was able to narrow it down to PixelGetColor(). For some reason even the most basic example is taking a long time, but earlier today it was working nice and fast, and i can't figure out why. In this example, each pixelGetColor took 145ms, when earlier today it took around 10ms. Any ideas? $timer=TimerInit() $temp = 0 For $temp = 1 to 40 $color = Hex(PixelGetColor(0, $temp), 6) Next ConsoleWrite("w took "&TimerDiff($timer)&" "&$temp&" "&Round(TimerDiff($timer)/$temp, 4)&@CRLF) 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
corgano Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) After restarting my computer, pixelGetColor() in the above example took 16.039 ms. IS there some kind of known bug / memory leak in pixelGetColor that isn't documented? Edited May 16, 2017 by corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
232showtime Posted May 16, 2017 Share Posted May 16, 2017 i think its only in your side, tested it and its working fast. ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
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