Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow rendering when firstRender with layoutColumnsOnNewData: true #4519

Open
mihalikv opened this issue Jun 13, 2024 · 0 comments
Open

Slow rendering when firstRender with layoutColumnsOnNewData: true #4519

mihalikv opened this issue Jun 13, 2024 · 0 comments
Labels
Possible Bug A possible bug that needs investigation

Comments

@mihalikv
Copy link

Describe the bug
I have a table with around 35 columns and 100 rows with pagination. When table is first rendered it takes some time to "boot up".
I think that it is possible to reduce initial render time by reducing call to layoutRefresh.

When table is first rendered profile looks like this:
image

When we already have table initialized and we call setData, result is following:
image

It means that when we load table for the first time, layoutRefresh is already call-ed because of this line https://github.com/olifolkerd/tabulator/blob/master/src/js/core/RowManager.js#L931

My proposal is to somehow prevent calling layoutRefresh twice, when the table is initialized.

Tabulator Info
Tabulator version 6.2.0
layoutColumnsOnNewData: true

Working Example
https://jsfiddle.net/ogy0rfh7/1/

To Reproduce
A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Enable CPU throttling 6x slowdown
  2. Record profiling
  3. Click on "Init Table"
  4. Click on "Update Table"
  5. Pause CPU profiling

Expected behavior
Create table as fast as possible.

@mihalikv mihalikv added the Possible Bug A possible bug that needs investigation label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Possible Bug A possible bug that needs investigation
Projects
None yet
Development

No branches or pull requests

1 participant