Original title: "performance improvement in selenium server standalone"
We are switching our Ruby-driven automated test grids from a node/hub configuration on our local infrastructure to a standalone configuration in AWS (2.44).
The node/hub setup runs firefox in individual linux instances, but the new configuration runs the full test grid in a single xvfb. It's on a solid AWS infrastructure, but The xvfb/AWS grid is performing more slowly than the old node/hub. Why?
The exception handling seems to be slower with selenium-standalone-server. Manipulating window handles also seems a bit slow:
14:07:23.442 INFO - Executing: [get window handles])
14:07:23.445 INFO - Done: [get window handles]
14:07:23.669 INFO - Executing: [get current window handle])
14:07:23.669 INFO - Executing: [get window handles])
14:07:23.672 INFO - Done: [get current window handle]
14:07:23.672 INFO - Done: [get window handles]
14:07:23.849 INFO - Executing: [switch to frame: null])
14:07:23.852 INFO - Done: [switch to frame: null]
14:07:24.089 INFO - Executing: [get window handles])
14:07:24.090 INFO - Executing: [switch to frame: null])
14:07:24.092 INFO - Done: [get window handles]
A half second just to switch around some windows... How can I improve this performance?
Update: On further inspection, the slowdown seems to be due to network latency between the JVM running the selenium jar and the controlling Ruby selenium code. Running the exact same Ruby code on the same machine as the selenium-server-standalone jar completely eliminates this unexpected latency in the window handling and other tasks.
So the question becomes: how to speed up Selenium if the jar and the controlling code are on different network infrastructures? Is there a way to reduce the network traffic between the jar and controlling code? Or is the only solution to put the controlling code on the same network or machine as the selenium jar?