jquery-ui/tests/unit/tabs
Michał Gołębiowski-Owczarek 0c5becce0e
Widget: Optimize attachment of the _untrackClassesElement listener
jQuery UI 1.13.0 changed the logic attaching the `_untrackClassesElement`
listener in the `_classes` widget method; one of the side effects was calling
`this._on` for each node that needed the listener. That caused a severe
performance degradation for large comboboxes as each `_on` jQuery UI call
causes a jQuery `add` call that calls Sizzle's `uniqueSort` underneath.

Instead, collect the nodes that need the listener and then, outside of the loop,
create a jQuery object out of them and attach the listener once. That's still
slower than the jQuery 1.12 version but only slightly: 936 ms to 1.03s on a very
large list on a recent MacBook Pro, compared to ~30 seconds before this patch.

Fixes gh-2014
Closes gh-2037
2022-01-15 01:26:23 +01:00
..
data moving test.html file to child dir for testswarm compability 2009-09-01 08:26:53 +00:00
all.html Tests: Switch to the new qunit-composite module 2015-04-07 09:03:36 -04:00
common.js Tabs: Fix test 2016-05-25 08:41:08 -04:00
core.js Widget: Optimize attachment of the _untrackClassesElement listener 2022-01-15 01:26:23 +01:00
events.js Build: Migrate from JSHint & JSCS to ESLint 2021-06-07 00:58:12 +02:00
helper.js Tabs: Shift to use no globals 2016-04-14 00:14:57 +05:30
methods.js Build: Migrate from JSHint & JSCS to ESLint 2021-06-07 00:58:12 +02:00
options.js Build: Migrate from JSHint & JSCS to ESLint 2021-06-07 00:58:12 +02:00
tabs.html Tests: Fix AMD loading in IE8 2015-04-17 12:13:38 -04:00