buefy icon indicating copy to clipboard operation
buefy copied to clipboard

Table performance issues/Blocking UI

Open jcunhafonte opened this issue 5 years ago • 15 comments

Overview of the problem

Buefy version: [0.9.2] Vuejs version: [2.6.11] OS/Browser: Chrome 85

Description

Buefy Table with 1000 rows has bad performance and blocks UI when mutating columns/data object.

Steps to reproduce

  1. Define a data object with 1000 rows
  2. Update a certain columns (for instance visibility).
  3. Notice the performance decreasing and UI blocked

Expected behavior

I'd expect the performance to be better when rendering/updating a certain column.

Actual behavior

Example JSFiddled: https://jsfiddle.net/jcunhafonte/e0L8gzxo/13/

jcunhafonte avatar Aug 25 '20 11:08 jcunhafonte

Maybe you should use Pagination (https://buefy.org/documentation/table#pagination-and-sorting) if you want to display that much data.

service-paradis avatar Aug 25 '20 13:08 service-paradis

Thank you @service-paradis. Is that the only solution? Can't I have 1000 rows on the same page?

jcunhafonte avatar Aug 25 '20 14:08 jcunhafonte

@jcunhafonte I'll investigate about it, thanks for the example

jtommy avatar Aug 27 '20 13:08 jtommy

@jtommy Virtual scrolling would be a good solution for these elements. Let me know if you need help with it.

jcunhafonte avatar Aug 27 '20 16:08 jcunhafonte

Virtual scroll is a feature in my mind, but I wanted to implement it without external dependencies. You can make a PR or discuss about it on Discord. Btw I want to investigate on current code to understand if there's a leak or other.

jtommy avatar Aug 27 '20 20:08 jtommy

Tested this problem "extensively" a year ago and this is a virtual dom problem as far as I can see. You can reproduce the same performance issue (1000+ rows) just by creating a normal html table and try to highlight a selected row. Same problem in all the major vue css component libraries. A Virtual Scroll seems to be the fix in my experience.

nockstarr avatar Sep 25 '20 19:09 nockstarr

Any news about Virtual scroll?

nockstarr avatar Oct 27 '20 19:10 nockstarr

@jcunhafonte news ?

jtommy avatar Oct 27 '20 22:10 jtommy

@jtommy Has any progress been made on virtual scrolling?

AcidRaZor avatar Dec 13 '21 04:12 AcidRaZor

Hey, Virtual scroll is really highly needed? Anyone would like to work on this with me?

pedrosimao avatar May 31 '22 18:05 pedrosimao

@pedrosimao you are welcome

jtommy avatar May 31 '22 18:05 jtommy

@jtommy what do you think of using this library as an optional prop of b-table component https://github.com/Akryum/vue-virtual-scroller? If you think it might be accepted as a PR I will work on it.

pedrosimao avatar Jun 01 '22 08:06 pedrosimao

No, as you can read in the docs and readme I wanted to avoid external dependencies

jtommy avatar Jun 01 '22 09:06 jtommy

The library is actually very small, why avoiding it? We could always copy and paste some code from it, but the result is almost the same. Isn't Bulma itself an external dependency?

pedrosimao avatar Jun 02 '22 09:06 pedrosimao

Yes, the only dependencies are Vue and Bulma. I know it might be a big work but I prefer to maintain in this way

jtommy avatar Jun 02 '22 09:06 jtommy