[Bug Report] v-datatable checkbox selection is slow when there is large data rendered
See original GitHub issueVersions and Environment
Vuetify: 1.3.15 Vue: 2.5.17 Browsers: Chrome 71.0.3578.98 OS: Linux x86_64
Steps to reproduce
In the given codepen, select a row in the table.
You’ll notice a lag in the selection of the checkbox. The number of rows is around 1800. It looks like the lag is due to the ripple on the checkbox,but, I may be wrong here.
My use case required a different background-color for the selected rows. The lag is prominently visible if we use a different background color for the active
rows
Expected Behavior
The checkbox should be selected without any lag for large datasets also.
Actual Behavior
Checkbox in data-table gets selected after a certain lag
Reproduction Link
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Performance issue on a (not so) big table — DataTables forums
It takes around 14 seconds to render. From what I have read, it should be less than 1 second. The search in a...
Read more >Bug analysis: slowness when working with a large table in IE
The more rows we had, the slower it gets. It was not hard to guess, selecting a checkbox somehow affects the whole table...
Read more >WPF DataGrid is very slow to render - Stack Overflow
I tried a GridView and it renders much fast on the screen. I have heard various reports of slow DataGrid drawing with complex...
Read more >Releases · Winter '23 - Trailblazer Community - Salesforce
We have found a performance issue with SOQL on Order Summary Object when OrderProductLineCount field is used in the query. These queries time...
Read more >Learning to cook — ObjectListView 2.9.1 documentation
Data bound checkboxes¶. Without doing anything else, the check boxes act as a more durable form of selection. If you want the checkboxes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We had this issue with a huge table, with vuetify 1.5 and vuetify 2 (different projects). For a large number of rows it is almost unusable, because it rerender everything for every action on the table. @lrosemberg investigated and found the problem and a solution.
For vuetify 2, your custom slots should be components instead of inline templates.
I changed the vuetify datatable example to validate the issue and the solution.
Original code:
Fixed example (check console logs to understand): https://codepen.io/iurisilvio/pen/XWbbKOP
For vuetify 1.5 we have a solution too, but because you don’t have the
show-select
directive, it is tricky to make checkbox work without this behaviour.in short: don’t call any functions inside of table cell slots - in this case they would be called on each selection change. Instead, put your function calls deeper - inside components, or outside of table (memoizing call results in data object). Thanks @iurisilvio for the fixed example