Timtech4u / gwtquery

Automatically exported from code.google.com/p/gwtquery
MIT License
0 stars 0 forks source link

Performance of filter() method #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Call the method filter on a GQuery elements containing a great number of 
elements takes a long time.

For example, with +/- 250 elements, the filter method takes 3sec.. instead few 
milliseconds in jQuery.

You should review the implementation of this method to avoid to filter elements 
one by one.

Original issue reported on code.google.com by julien.d...@gmail.com on 2 Aug 2012 at 3:36

GoogleCodeExporter commented 9 years ago
could you provide a test-case?
does it perform bad in all browsers?

Original comment by manuel.carrasco.m on 7 Sep 2012 at 4:54

GoogleCodeExporter commented 9 years ago
It was bad on chrome so I guess it is bad on my other browser.
I will provide a test case after my holidays.

Original comment by julien.d...@gmail.com on 8 Sep 2012 at 8:23

GoogleCodeExporter commented 9 years ago
I wrote a little test case to compare JQuery and GQuery :  
http://jdramaix.github.com/testissue146/TestIssue146.html 

Source available in github : https://github.com/jDramaix/testissue146

It's really bad with firefox (4ms for jquery and  800ms for GwtQuery)

The most important is that the running time of the filter method in GQuery is 
dependent of n. In jQuery, the time is almost constant.

Original comment by julien.d...@gmail.com on 1 Oct 2012 at 4:03

GoogleCodeExporter commented 9 years ago
Thanks for reporting. I've migrated this issue to github : 
https://github.com/gwtquery/gwtquery/issues/177
Please follow the issue there.

Original comment by julien.d...@gmail.com on 15 Jul 2013 at 4:08