Project

General

Profile

Actions

Bug #5778

closed

cbselect crashes JS on too many options

Added by krileon almost 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
10 February 2016
Due date:
% Done:

100%

Estimated time:

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).

Actions #1

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.

Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by krileon almost 8 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF