Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jan 2013 at 08:05 UTC
Updated:
29 Jul 2014 at 21:43 UTC
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/
| Comment | File | Size | Author |
|---|---|---|---|
| tableselect_perforamnce_fix.patch | 2.51 KB | droplet |
Comments
Comment #1
wim leersCan you create a benchmark on jsperf.com? Intuitively, I doubt this will make a big difference?
Comment #2
droplet commentedhttp://jsperf.com/jquery-ext-vs-dom
Comment #3
droplet commentedcheck out this version if you looking for more real world (drupal test) result: http://jsperf.com/jquery-ext-vs-dom/2
Comment #4
kscheirerThanks 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?
Comment #5
nod_@kscheirer you'll want to look at #1415788: Javascript winter clean-up and #1574470: Selectors clean-up
Comment #6
droplet commentedIf 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
Comment #7
kscheirerI'm convinced.
Comment #8
dries commentedCommitted to 8.x. Thanks.