what's wrong ?

So … tableselect.js really is the cause of all this slowness. Apply the attached patch and be delighted. You might even put away that knife that you wanted to use to stab your eyes out. (OTOH, with this patch applied, if you want to run *all* tests, now you'll want to use the aforementioned knife to check the zillion checkboxes on your screen.)

see: http://drupal.org/node/1751418#comment-6902852

Patch:
use native way to boost the perofmrnace.
http://api.jquery.com/category/selectors/jquery-selector-extensions/

CommentFileSizeAuthor
tableselect_perforamnce_fix.patch2.51 KBdroplet

Comments

wim leers’s picture

Can you create a benchmark on jsperf.com? Intuitively, I doubt this will make a big difference?

droplet’s picture

droplet’s picture

check out this version if you looking for more real world (drupal test) result: http://jsperf.com/jquery-ext-vs-dom/2

kscheirer’s picture

Thanks for the benchmarks! http://jsperf.com/jquery-ext-vs-dom/2 seems to indicate that using the .filter() method would be faster across all browsers. IE and Firefox like that better, and Chrome is about the same whether you use filter or native dom method. Any way to get Safari in on that jsperf test?

Whichever method ends up getting used, is it worth fixing in other *.js files we include with drupal core? Or is tableselect the only one where this is enough of a performance benefit to merit a patch?

nod_’s picture

droplet’s picture

If the speed of NATIVE BROSWR WAY is acceptable in most cases, I'd chosen it over the fastest way.

http://jsperf.com/jquery-ext-vs-dom/6

a little change (add one more matched element (a select-all checkbox)) could make the result so close

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

I'm convinced.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.