question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] v-datatable checkbox selection is slow when there is large data rendered

See original GitHub issue

Versions 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

https://codepen.io/anon/pen/oJeBjJ

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
iurisilviocommented, Feb 10, 2020

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.

0reactions
Roman86commented, Aug 4, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found