vue-treeselect icon indicating copy to clipboard operation
vue-treeselect copied to clipboard

Performance issues with long lists

Open iamohd-zz opened this issue 6 years ago • 13 comments

Hi

There is a noticeable performance issue when the list is long

Here is a case for the issue: https://codesandbox.io/s/9jjwmz7mwo

Thanks.

iamohd-zz avatar Jun 29 '18 12:06 iamohd-zz

Thanks for your feedback! I'll look into this.

riophae avatar Jun 29 '18 16:06 riophae

Hi,

Is there any update on this? I have a very long list of around 1000 elements, even while opening and closing the dropdown its very slow Thanks.

siddhanntarora1992 avatar Nov 26 '18 13:11 siddhanntarora1992

Hi,

I have the same issue, with a very long list (1000 elements). It's slow on opening and closing the dropdown. Thanks

rom1vtle avatar Jun 18 '19 07:06 rom1vtle

Same here. It is worse when use multi-select mode. I really like this treeselect, but this long list performance issue stops us to use it.

leonzhu1985 avatar Aug 06 '19 17:08 leonzhu1985

Does this issue fixed?

almas avatar May 04 '20 09:05 almas

Same here.It is slow when has 1000 item of list.How can I use lazy load or virsual dom ?

WQMDC avatar May 13 '20 14:05 WQMDC

Hi Team, It is very slow when we use more than 1000 items in multi-select mode. is there any update on this thanks

sumanthkumr avatar Oct 24 '20 03:10 sumanthkumr

Hi, did you resolve this problem or did any of you find a workaround?

Meshz avatar Jan 20 '21 21:01 Meshz

Hi, you can speed up performance so that is working with 5k entries.

The problem is that renderArrow() in Option.vue subscribes to computed property, to fix it:

Declare hasBranchNodes in treeselectMixin.js not as method in computed properties but as a normal non tracked one and then assign it in initialize

MichalWi avatar Mar 30 '21 21:03 MichalWi

Also, I was able to further speed things up by breaking some functionality by removing: setupMenuSizeWatcher adjustMenuOpenDirection setupResizeAndScrollEventListeners

Now it is working on 10k entries, tested on M1 Mac

MichalWi avatar Mar 30 '21 21:03 MichalWi

I tried with the an array with 1500 records only ( 1500 cities in Germany) and the animation when open the menu is sluggish.

I even tried to remove the 3 methods that @MichalWi mentioned above but the animation is still delayed when open (I installed the package from @almas repository).

Do you guys know any way I can optimize further for this issue?

kphan102 avatar Dec 07 '21 22:12 kphan102

Try my fork (https://github.com/dusal/vue-treeselect) with following parameters:

/**
  * For performance we can set a start search length. It doesn't run search until sat length. If there are thounds of options then this helps well.
  * default: 1
  */
 startSearchLength: {
   type: Number,
   default: 1
 },

 /**
  * For performance we can set a wait time for search. It wait between characters sat time and run search on time only last. It helps much options there.
  * default: 0
  * time measurement: millisecond
  */
 waitSearchFinishTime: {
   type: Number,
   default: 0
 },

almas avatar Feb 09 '22 07:02 almas

Try my fork (https://github.com/dusal/vue-treeselect) with following parameters:

/**
  * For performance we can set a start search length. It doesn't run search until sat length. If there are thounds of options then this helps well.
  * default: 1
  */
 startSearchLength: {
   type: Number,
   default: 1
 },

 /**
  * For performance we can set a wait time for search. It wait between characters sat time and run search on time only last. It helps much options there.
  * default: 0
  * time measurement: millisecond
  */
 waitSearchFinishTime: {
   type: Number,
   default: 0
 },

seems to be working smoothly! will update if notice any problems thank you! <3

peterlupu avatar Sep 02 '22 09:09 peterlupu