Following are the results against the latest performance benchmark tests.
Final results: [Firefox 3]
 TestName: testFlowByDefaultXPath, TotalTime: 138379ms, RepeatCount: 10,
AverageAccumulatedTime: 6478ms
 TestName: testFlowByJavascriptXPath, TotalTime: 156557ms, RepeatCount: 10,
AverageAccumulatedTime: 6239ms
 TestName: testFlowByJQuerySelector, TotalTime: 149629ms, RepeatCount: 10,
AverageAccumulatedTime: 6175ms
 TestName: testFlowByDefaultXPathNoGroup, TotalTime: 130607ms, RepeatCount:
10, AverageAccumulatedTime: 5895ms
 TestName: testFlowByJavascriptXPathNoGroup, TotalTime: 133800ms,
RepeatCount: 10, AverageAccumulatedTime: 5982ms
 TestName: testFlowByJQuerySelectorNoGroup, TotalTime: 137329ms,
RepeatCount: 10, AverageAccumulatedTime: 5960ms
 TestName: testGetDataByDefaultXPath, TotalTime: 176104ms, RepeatCount: 10,
AverageAccumulatedTime: 16593ms
 TestName: testGetDataByJavascriptXPath, TotalTime: 175956ms, RepeatCount:
10, AverageAccumulatedTime: 16423ms
 TestName: testGetDataByJQuerySelector, TotalTime: 9895ms, RepeatCount: 10,
AverageAccumulatedTime: 159ms


 Final results: [IE 7]
 TestName: testFlowByDefaultXPath, TotalTime: 227593ms, RepeatCount: 10,
AverageAccumulatedTime: 13823ms
 TestName: testFlowByJavascriptXPath, TotalTime: 205911ms, RepeatCount: 10,
AverageAccumulatedTime: 13289ms
 TestName: testFlowByJQuerySelector, TotalTime: 164979ms, RepeatCount: 10,
AverageAccumulatedTime: 7860ms
 TestName: testFlowByDefaultXPathNoGroup, TotalTime: 222122ms, RepeatCount:
10, AverageAccumulatedTime: 13313ms
 TestName: testFlowByJavascriptXPathNoGroup, TotalTime: 216983ms,
RepeatCount: 10, AverageAccumulatedTime: 13120ms
 TestName: testFlowByJQuerySelectorNoGroup, TotalTime: 164522ms,
RepeatCount: 10, AverageAccumulatedTime: 7297ms
 TestName: testGetDataByDefaultXPath, TotalTime: 485120ms, RepeatCount: 10,
AverageAccumulatedTime: 47582ms
 TestName: testGetDataByJavascriptXPath, TotalTime: 478030ms, RepeatCount:
10, AverageAccumulatedTime: 47057ms
 TestName: testGetDataByJQuerySelector, TotalTime: 9971ms, RepeatCount: 10,
AverageAccumulatedTime: 239ms

There is obviously improvement in the execution of the tests on IE using
JQuery selector.


-Haroon

2009/4/15 Haroon Rasheed <[email protected]>

> I am running the tests against IE7 and all the tests are failing
> for TelluriumIssueTestCase as the test is not able to find the following
> element.
> //descendant-or-self::table[descendant::a and @id="resultstable" and
> @class="results"]/tbody/tr[child::th]/th[11]
>
> I will update the version that I have and re-run the tests.
>
>
> Thanks
> Haroon
>
> 2009/4/15 John <[email protected]>
>
>
>> BTW, I changed the code a bit to reduce the loop in the test. So, do
>> not compare
>> the results directly with the ones for Firefox. Also repeat count 2
>> seems too low and may be
>> there are still some random effects. Haroon, if you run the tests,
>> please check out the latest
>> one form svn and set the repeat count to at least 10.
>>
>> Thanks,
>>
>> Jian
>>
>> On Apr 15, 5:49 pm, John <[email protected]> wrote:
>> > Finally, I got a Windows box and installed everything to run the
>> > benchmark test. Here are the results I got for IE 6.0:
>> >
>> > Final results:
>> >  TestName: testFlowByDefaultXPath, TotalTime: 39268ms, RepeatCount: 2,
>> > AverageAccumulatedTime: 11164ms
>> >  TestName: testFlowByJavascriptXPath, TotalTime: 34487ms, RepeatCount:
>> > 2, AverageAccumulatedTime: 10422ms
>> >  TestName: testFlowByJQuerySelector, TotalTime: 26376ms, RepeatCount:
>> > 2, AverageAccumulatedTime: 6641ms
>> >  TestName: testFlowByDefaultXPathNoGroup, TotalTime: 34080ms,
>> > RepeatCount: 2, AverageAccumulatedTime: 10734ms
>> >  TestName: testFlowByJavascriptXPathNoGroup, TotalTime: 37612ms,
>> > RepeatCount: 2, AverageAccumulatedTime: 10727ms
>> >  TestName: testFlowByJQuerySelectorNoGroup, TotalTime: 27408ms,
>> > RepeatCount: 2, AverageAccumulatedTime: 6976ms
>> >  TestName: testGetDataByDefaultXPath, TotalTime: 73504ms, RepeatCount:
>> > 2, AverageAccumulatedTime: 36166ms
>> >  TestName: testGetDataByJavascriptXPath, TotalTime: 70176ms,
>> > RepeatCount: 2, AverageAccumulatedTime: 34189ms
>> >  TestName: testGetDataByJQuerySelector, TotalTime: 4437ms,
>> > RepeatCount: 2, AverageAccumulatedTime: 179ms
>> >
>> > Seems jQuery is much better than both XPath libraries from performance
>> > aspect, though still lower than what we expected. To be
>> > fair, we may need to run more tests for different types of webs.
>> > Could someone use our benchmark project as a template
>> > and donate some test code to us, or just report the results to us.
>> >
>> > Thanks,
>> >
>> > Jian
>> >
>> > On Apr 15, 2:31 pm, John <[email protected]> wrote:
>> >
>> > > Just came across a post discussing the jQuery selector speed,
>> >
>> > >http://www.nabble.com/selector-best-practice-td22032693s27240.html
>> >
>> > > Seems jQuery selector is slower than native DOM operators in Firefox.
>> > > But I still think it is a huge enhancement to Tellurium for the
>> > > following
>> > > reasons:
>> >
>> > > 1) jQuery hides browser details and you do not need to worry about
>> > > if your code may not work in other browsers
>> > > 2) jQuery selector can return multiple elements in one method call,
>> > > which
>> > > makes Tellurium much faster in some use cases such as getting data
>> > > from a big table.
>> > > 3) Tellurium engine will use jQuery and exploit the UI module so that
>> > > the UI module will be a speed bless instead of a curse.
>> >
>> > > Last but not the least, jQuery is designed to speed up the testing in
>> > > IE,
>> > > I still think we can get much better speed in IE.
>> >
>> > > On Apr 15, 2:12 pm, Jian Fang <[email protected]> wrote:
>> >
>> > > > Hi Dominicm,
>> >
>> > > > For abstract container, you do not need (should not actually, maybe
>> I gave
>> > > > bad examples in my tutorials?)  to specify the clocator and you can
>> use
>> >
>> > > > ui.Container(uid:'coupon'){
>> >
>> > > > >
>>  Table(uid:'table',clocator:[id:'MVContentPredictionsTable']){
>> > > > >                Container(uid:"all",clocator:[:]){
>> > > > >                }
>> > > > >        }
>> > > > > }
>> >
>> > > > Does the inner Container include any attributes in clocator? Could
>> you post
>> > > > the generated jQuery selector here?
>> >
>> > > > Also, you could run our benchmark project in IE if you have any
>> time.
>> >
>> > > > Thanks,
>> >
>> > > > Jian
>> >
>> > > > On Wed, Apr 15, 2009 at 2:05 PM, dominicm <
>> [email protected]>wrote:
>> >
>> > > > > Hi John,
>> >
>> > > > > Forgot to mention that results were from IE.
>> >
>> > > > > The JQuery selector used was generated using Tellurium, so maybe
>> there
>> > > > > is some tuning to do.
>> >
>> > > > > It's probably inserting the "*" because of the abstract container
>> in
>> > > > > the ui module
>> >
>> > > > > ui.Container(uid:'coupon',clocator:[:]){
>> > > > >
>>  Table(uid:'table',clocator:[id:'MVContentPredictionsTable']){
>> > > > >                Container(uid:"all",clocator:[:]){
>> > > > >                }
>> > > > >        }
>> > > > > }
>> >
>> > > > > If I remove the "*" then things are much faster.
>> >
>> > > > > In all cases the getText command does not return anything,
>> although
>> > > > > the XPath version does.
>> >
>> > > > > On Apr 15, 6:22 pm, John <[email protected]> wrote:
>> > > > > > I added another set of tests without group locating and here are
>> the
>> > > > > > results I tested in my Linux box with Firefox 2.
>> >
>> > > > > > Final results:
>> > > > > >  TestName: testFlowByDefaultXPath, TotalTime: 44432ms,
>> RepeatCount: 2,
>> > > > > > AverageAccumulatedTime: 13502ms
>> > > > > >  TestName: testFlowByJavascriptXPath, TotalTime: 38527ms,
>> RepeatCount:
>> > > > > > 2, AverageAccumulatedTime: 13528ms
>> > > > > >  TestName: testFlowByJQuerySelector, TotalTime: 42404ms,
>> RepeatCount:
>> > > > > > 2, AverageAccumulatedTime: 14776ms
>> > > > > >  TestName: testFlowByDefaultXPathNoGroup, TotalTime: 38111ms,
>> > > > > > RepeatCount: 2, AverageAccumulatedTime: 13488ms
>> > > > > >  TestName: testFlowByJavascriptXPathNoGroup, TotalTime: 41408ms,
>> > > > > > RepeatCount: 2, AverageAccumulatedTime: 13420ms
>> > > > > >  TestName: testFlowByJQuerySelectorNoGroup, TotalTime: 54359ms,
>> > > > > > RepeatCount: 2, AverageAccumulatedTime: 14643ms
>> > > > > >  TestName: testGetDataByDefaultXPath, TotalTime: 90851ms,
>> RepeatCount:
>> > > > > > 2, AverageAccumulatedTime: 44811ms
>> > > > > >  TestName: testGetDataByJavascriptXPath, TotalTime: 91112ms,
>> > > > > > RepeatCount: 2, AverageAccumulatedTime: 44755ms
>> > > > > >  TestName: testGetDataByJQuerySelector, TotalTime: 1665ms,
>> > > > > > RepeatCount: 2, AverageAccumulatedTime: 165ms
>> >
>> > > > > > Where TotalTime is the total test run time, RepeatCount is the
>> number
>> > > > > > of repeated tests. AverageAccumulatedTime is the average time
>> > > > > > for the time the code spent on a list of test methods that we
>> think
>> > > > > > are not affected by network latency, which should be more
>> accurate
>> > > > > > than the TotalTime.
>> >
>> > > > > > Seems jQuery Selector is a bit slower than XPath in Firefox, but
>> > > > > > almost at the same speed (This also means there are room for us
>> > > > > > to improve the jQuery selector). But for Bulk data, jQuery is
>> way
>> > > > > > better since it only uses one method call.
>> >
>> > > > > > Hope someone can checkout the benchmark project and provide us
>> the
>> > > > > > results in IE and other web browsers.
>> >
>> > > > > > Thanks,
>> >
>> > > > > > Jian
>> >
>> > > > > > On Apr 15, 12:30 pm, Jian Fang <[email protected]>
>> wrote:
>> >
>> > > > > > > Also, why you have * before "table#MVContentPredictionsTable"?
>> "*"
>> > > > > matches
>> > > > > > > all and does not really contribute
>> > > > > > > to anything, but may cause some performance problem, thus
>> jQuery
>> > > > > selector
>> > > > > > > will automatically skip that. Could you remove the "*" and
>> re-run the
>> > > > > code?
>> >
>> > > > > > > Thanks,
>> >
>> > > > > > > Jian
>> >
>> > > > > > > On Wed, Apr 15, 2009 at 12:01 PM, dominicm <
>> [email protected]
>> > > > > >wrote:
>> >
>> > > > > > > > Hi All,
>> >
>> > > > > > > > I've conducted some very basic relative timings for JQuery
>> vs XPath
>> > > > > > > > selectors in Selenium, using the same rather old and
>> difficult
>> > > > > > > > frontend code as I used when baselining css selectors.
>> >
>> > > > > > > > Code is as follows:
>> >
>> > > > > > > > Use faster XPath library
>> > > > > > > > sel.useXpathLibrary("javascript");
>> > > > > > > > sel.isElementPresent("//descendant-or-self::*/descendant-"+
>> >
>> > > > >
>>  "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td]
>> > > > > > > > [8]/td[5]/des"+
>> > > > > > > >        "cendant-or-self::*");
>> >
>> > > > > > > > sel.getText("//descendant-or-self::*/descendant-"+
>> >
>> > > > >
>>  "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td]
>> > > > > > > > [8]/td[5]/des"+
>> > > > > > > >        "cendant-or-self::*");
>> >
>> > > > > > > > sel.isElementPresent("jquery=*
>> table#MVContentPredictionsTable >
>> > > > > tbody
>> > > > > > > > > tr:has(td):eq(8) > td:eq(5)");
>> > > > > > > > sel.getText("jquery=* table#MVContentPredictionsTable >
>> tbody >
>> > > > > tr:has
>> > > > > > > > (td):eq(8) > td:eq(5)");
>> >
>> > > > > > > > Performance for the above for both JQuery and css was
>> appalling,
>> > > > > > > > taking over 2 minutes in total, compared to 20secs for
>> XPath.
>> >
>> > > > > > > > The only way I could get JQ to respond in a decent time
>> (4secs) was
>> > > > > to
>> > > > > > > > modify the selector to
>> > > > > > > > "jquery=*#MVContentPredictionsTable > tbody >
>> tr:has(td):eq(8) >
>> > > > > td:eq
>> > > > > > > > (5)"
>> > > > > > > > but this did not find the correct element- Hide quoted text
>> -
>> >
>> > > > > > - Show quoted text -
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to