Details
-
Bug
-
Resolution: Fixed
-
P3
-
21, 22
-
b12
Description
Some tests are calling getPixelColor in a loop
e.g.
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 50; j++) {
robot.getPixelColor(i, j);
}
}
While this is not the most efficient way to get data from the screen (you can use createScreenCapture), it can be sped up.
Currently we create a screencast session from scratch for each call to getPixelColor or createScreenCapture.
To speed it up, we can close the session after some reasonable time (2s for example) if there is no new screen capture attempt.
We should also change the tests to use createScreenCapture in such cases.
e.g.
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 50; j++) {
robot.getPixelColor(i, j);
}
}
While this is not the most efficient way to get data from the screen (you can use createScreenCapture), it can be sped up.
Currently we create a screencast session from scratch for each call to getPixelColor or createScreenCapture.
To speed it up, we can close the session after some reasonable time (2s for example) if there is no new screen capture attempt.
We should also change the tests to use createScreenCapture in such cases.