ember-power-select icon indicating copy to clipboard operation
ember-power-select copied to clipboard

Interesting performance bottleneck with large list

Open Bouke opened this issue 3 years ago • 2 comments

An API endpoint unexpectedly returned a very large set of items (~45k). The load happens through Ember Data and the processing went fine. However the page became unresponsive and investigation showed an unexpected bottleneck: getBoundingClientRect. See also this trace in Safari:

image

While I agree that listing 45k items isn't a practical use-case, I do think that it shouldn't cause the page to become unresponsive. This call is originating from setupMutationObserver. Maybe a debounce of some sorts would help?

This is on EPS 4.1.2, EBD 3.0.13 and Ember 3.25.1.

Bouke avatar Sep 19 '22 07:09 Bouke

We implemented / copied an approach utilizing VerticalCollection of the "@html-next/vertical-collection" package. Works quite well with large lists. Hope this inspires ;)

derrabauke avatar Feb 28 '23 16:02 derrabauke

We also did that in ember-eui/combo-box

betocantu93 avatar Jan 12 '24 12:01 betocantu93