Bug #5778
closedcbselect crashes JS on too many options
Description
When a select is parsed by cbselect (into a select2 usage) and there is say 200 options it can crash JS causing the browser to hang. See if the parsing can be improved to speed this up (maybe not destroy the select on close if it's too large).
Updated by krileon about 8 years ago
This appears to be entirely due to the event bubbling when binding to the change event, which fires cbParamChange so the conditions can work.
Updated by krileon about 8 years ago
The multipleselect usage is also extremely slow for large inputs. This seams to be half coming from repositionMultipleSelect on initial create of the multiselect.
Updated by krileon about 8 years ago
Further testing confirms the slowing is coming almost entirely from the multiselect usage. The single select usage isn't showing any problems handling large inputs.
Updated by krileon about 8 years ago
It's due to the number of DOM elements that it's creating. select2 creates them on open on-demand. The multipleselect creates them on binding of the jQuery plugin resulting in thousands of DOM elements sitting there unused, which is causing all DOM parsing behavior to become slow. This multipleselect usage may have to be removed in favor of the tags usage just built into select2.
Updated by krileon about 8 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Fixed in MR !1150
multipleselect replaced by select2 usage entirely. Note there is no danger in this change as cbSelect was bridging the usage to those 2 jQuery plugins.