multi-select icon indicating copy to clipboard operation
multi-select copied to clipboard

speed an issue with about 2500 options

Open LukeMcLachlan opened this issue 8 years ago • 3 comments

I read some speed issues from a few years back, that rendering the selectbox list is slow. I am experiencing about a 5 second delay before the selectbox appears in its rendered state, is this normal for such a long list? I wonder if there is a workaround? Many thanks.

LukeMcLachlan avatar Feb 17 '17 01:02 LukeMcLachlan

I created my github account a few minutes ago, i will check the guide on how to commit a request because i had a similar problem with delay while moving the mouse around a list with 3000+ options and i think i found the solution, im a junior frontend developer by the way so expect me to be wrong but in 'activeMouse' function from jquery.multi-select.js, when the event mouseenter is called the class ms-hover is removed from all the options, i just modified it to only remove ms-hover from the last element that received ms-hover and that improved a lot the performance on the 3000+ options list.

sapeeeeee avatar Mar 23 '17 13:03 sapeeeeee

I'm running into speed issues as well, though with around 1500 items.

@sapeeeeee if you had your version, or even a diff of what was changed that would be great.

simondotwhite avatar Dec 15 '17 11:12 simondotwhite

I was using v0.9.8, dont remember if i changed more than just the activeMouse function but this is the before/after:

Before: 'activeMouse' : function($list){ var that = this; $list.on('mousemove', function(){ var elems = $list.find(that.elemsSelector); elems.on('mouseenter', function(){ elems.removeClass('ms-hover'); $(this).addClass('ms-hover'); }); }); After: image

I wish its helpful.

sapeeeeee avatar Dec 15 '17 12:12 sapeeeeee