Bug #5778
closed
cbselect crashes JS on too many options
Added by krileon almost 9 years ago.
Updated almost 8 years ago.
Start date:
10 February 2016
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).
This appears to be entirely due to the event bubbling when binding to the change event, which fires cbParamChange so the conditions can work.
The multipleselect usage is also extremely slow for large inputs. This seams to be half coming from repositionMultipleSelect on initial create of the multiselect.
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.
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.
- 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.
- Status changed from Resolved to Closed
Also available in: Atom
PDF