History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-453
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Dennis Byrne
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Boost Selenium RC performance by batching certain RPC commands

Created: 02/Apr/08 07:41 PM   Updated: 19/Oct/08 06:43 PM
Component/s: Client Driver - Java, Client Driver - .NET, Client Driver - Python, Client Driver - Ruby, Client Driver - Perl, Client Driver - PHP
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
My understanding is that all Selenium RC drivers have a one to one relationship between command methods and RPC calls to the browser. In other words, this code will make five synchronous sequential remote calls.

rc.click(here)
rc.click(there)
rc.click(here)
rc.getEvale(js)
rc.click(there)

This could be optimized to make two remote calls (it cannot be optimized to one command because the forth method invocation has a return value).

Rough idea as to how to implement this :
Use a Proxy Design Pattern to intercept all RC method calls and push each to an internal queue. If the command can be batched, do nothing unless this is the last command in the test. If the command cannot be batched, flush the queue.

From Huggins in a private conversation :
>It's a good idea.. The XML-RPC protocol has a notion of "boxcarring" requests in a similar way using a "multiCall" command... No reason we >couldn't/shouldn't do the same in Selenium... I suggest opening an Jira ticket for it, with a description of how it could/should work, then fire off a note >to the selenium dev list for more opinions.
>Here's an example of the "multiCall" API in Python for xml-rpc:
>http://docs.python.org/lib/node656.html

Challenges that I see:
How do you know when the last command is? I would not be a big fan of this :

rc.startTransaction()
rc.click(there)
rc.click(that)
rc.commitTransaction() // flushes the queue

 All   Comments   Work Log   Change History      Sort Order:
Andras Hatvani - 19/Oct/08 06:43 PM
Changing issue type.