1

So I have a table with 50 columns and about 4-600 rows and laggy poor performance. There are some computed properties in use. The tables cells are inputs, selects and textareas.

I use the vue-scrolling-table, because I need vertical and horizontal scrolling, and fixed first column. But the performance is really bad.

I also have the same setup, somewhere else is the app, but it doesn't have the same performance issues.

I already tried to use a virtual list, but I could'nt get it working with the vue-scrolling-table/ (the header didn't follow the scrolling, and the vertical scroller was only available if I scroll to the bottom) I also looked at virtual scroller but it recomanded not to use with inputs and such, since it is replacing the data inside the input, and that would trigger the change event etc.

I have a v-for, that goes through the data, and one v-for inside, for a subset in the columns. (I can't be sure how many columns there will be.)

<template slot="tbody">
    <tr v-for="(row,index) in table" :key="index">
        <td>
            <input v-model="table[index].someItem">
        </td>
        <td>
            <select v-model="listyThing">
                <option v-for="item in list">{{item}}<option>
             </select>
        </td>
  ...


# I have some computed stuff ,(like 4)
SomeComputedFunction: function() {
    return this.table.map((row) => {
        return row.some * row.somethingelse
    })
}

This should work fine. The data I'm working with is not that big, that it should cause problems. I try to do anything in this, and the cpu spins up to 100% and everything happens with 2s delays.

Also one interesting thing I found, the selects open in like 3 secs. I thought that was curious.

When I used the virtual list the performance was better, but I need some other solution for the table.

Does anyone have an idea what is the difference between this, and my other one which works just fine (more data and more computed properties actually) So what I think the difference can be is the selects and the v-for rendered columns (about 20 of them rendered this way). Or maybe the textareas?

Thanks in advance!

Balázs Zákány
  • 353
  • 1
  • 11
  • I don't understand your problem. But I am using Table on this framework and it work fine https://element.eleme.io/#/en-US. Could you take a look? – Hoang Tran Son Jan 03 '19 at 03:42
  • Hi, which part isn't clear? Maybe I could improve it a bit. I did take a look, but I didn't find the table., could you be a bit more specific? On other note, I will try to make a custom table like thing with scroll event to sync the header. Does that sound reasonable or there should be something better? – Balázs Zákány Jan 03 '19 at 09:06
  • [Here](https://element.eleme.io/#/en-US/component/table#table) Could you check? Since you put input in table which we are not do for hundred years. It is weird to me. Sorry. – Hoang Tran Son Jan 03 '19 at 09:28

0 Answers0