Tabulator: the process of loading an extensive amount of data requires a significant amount of time

Currently, I am encountering an issue with loading data using a tabulator on my webpage. There are 38 tables that need to be populated, each containing approximately 2000 rows of data. The problem lies in the fact that it is taking an excessive amount of time for the data to load - around 30 minutes, which is completely unacceptable. Even after attempting pagination, our strict printing requirements are not being met as the data is not fully accessible when trying to print (ctrl + P).

In my setup, I am utilizing HTML Formatter, textarea, and fit columns for display purposes.

One of the specific tables used is outlined below:

const someTable = new Tabulator('#someContainer', {
    layout: 'fitColumns',
    resizableRows: true,
    columns: [
        { title: 'f1', field: 'col1', sorter: 'string', headerSort: false, formatter: 'textarea' },
        { title: 'f2', field: 'col2', sorter: 'string', headerSort: false, formatter: 'textarea' },
        { title: 'f3', field: 'col3', sorter: 'string', headerSort: false, formatter: 'textarea' },
        { title: 'f4', field: 'col4', sorter: 'string', headerSort: false, formatter: 'textarea' },
        { title: 'f5', field: 'col5', sorter: 'string', headerSort: false, formatter: 'textarea' },
        { title: 'f6', field: 'col6', sorter: 'string', headerSort: false, formatter: 'textarea' }
    ]
});

let someData = document.getElementById('someData').value;
someData = JSON.parse(someData);
someTable.addData(someData, true);
setTimeout(function() {
    someTable.redraw(true);
}, 100);
}

I would greatly appreciate any insights into why this slow loading process is occurring. (I have also tried removing the timeout without significant improvement).

Additionally, experimenting with progressive loading did not result in reduced loading times either.

Answer №1

At this moment, you are expending unnecessary effort for the Tabulator.

  1. Initiating the Tabulator.
  2. Populating it with data.
  3. Refreshing it.

All these tasks put a strain on the Tabulator. To improve performance, consider constructing the table with the data initially. This eliminates the need for constantly redrawing the table and enhances loading speed. Below is an adjusted example for your reference.

    let someData = document.getElementById('someData').value;
    someData = JSON.parse(someData);
    const someTable = new Tabulator('#someContainer', {
        layout: 'fitColumns',
        resizableRows: true,
        data: someData,
        columns: [
            { title: 'f1', field: 'col1', sorter: 'string', headerSort: false, formatter: 'textarea' },
            { title: 'f2', field: 'col2', sorter: 'string', headerSort: false, formatter: 'textarea' },
            { title: 'f3', field: 'col3', sorter: 'string', headerSort: false, formatter: 'textarea' },
            { title: 'f4', field: 'col4', sorter: 'string', headerSort: false, formatter: 'textarea' },
            { title: 'f5', field: 'col5', sorter: 'string', headerSort: false, formatter: 'textarea' },
            { title: 'f6', field: 'col6', sorter: 'string', headerSort: false, formatter: 'textarea' }
        ]
    });

Considering the number of tables being loaded, optimizing beyond Tabulator is advisable. It's unlikely that all 38 tables will be viewed simultaneously by a user. Prioritize placing the most accessed tables at the top and pre-load them when the page loads. As the user scrolls, create/load additional tables dynamically. This mirrors the concept of lazy loading images, only applied to Tabulator in this scenario.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When conducting unit testing with Express, encountering an error message such as "`call of undefined`" may indicate that

In my current quest to test a node.js application using express, I encountered an issue. After successfully returning a simple 404.html page, I attempted to close the node http server, resulting in an error: Fatal error: Cannot call method 'call&apos ...

Generating div elements of varying colors using a combination of Jinja templating and JavaScript loop

Utilizing jinja and javascript in my template, I am creating multiple rows of 100 boxes where the color of each box depends on the data associated with that row. For instance, if a row in my dataset looks like this: year men women 1988 60 40 The co ...

What is the proper usage of a jwt token?

I'm completely new to this and I've dedicated all my time to figuring out how to create a mechanism for generating JWT tokens. These tokens are necessary for identifying the 'signed in' status of users. I opted for FastAPI, and after s ...

Identifying a Resizable Div that Preserves its Aspect Ratio During Resizing

Below is the HTML code snippet I'm working with: <div id="myid_templates_editor_text_1" class="myid_templates_editor_element myid_templates_editor_text ui-resizable ui-draggable" style="width: 126.79999999999998px; height: 110px; position: absolut ...

How can one determine the most accurate box-shadow values?

I am trying to extract the precise box-shadow parameters from a CSS style rule generated by the server. My main focus is determining whether the element actually displays a visible shadow or not. There are instances where the shadow rule is set as somethi ...

Modify the background color of a particular TD element when clicking a button using JavaScript and AJAX

When I click on the "Active account" button inside the designated td with the <tr id="tr_color" >, I want the value "1" to be added to the 'active_account' column in the database. I have been successful with this functionality. However, I a ...

When switching from JavaScript to jQuery, the button values become invisible

Currently, I have a functional app that can dynamically change the values of buttons based on user input. The current implementation is in vanilla JavaScript within the script.js file. However, I am looking to enhance the functionality and user experience ...

How can I trigger the rendering of a component by clicking a button in a separate component?

I am currently facing a challenge in rendering a component with an "Edit" button that is nested within the component. I attempted to use conditional rendering in my code, but unfortunately, I am struggling to make it work as expected. Does anyone have any ...

Refreshable div element in a Code Igniter-powered web application

I am encountering difficulties with automatically refreshing my div using the CodeIgniter framework. My goal in the code snippet below is to have the particular div with id="lot_info" refresh every 1 second. The div is not refreshing, and an error message ...

Symfony using Vite with Vue 3 encounters an error: Uncaught ReferenceError - exports is undefined

Currently, I am in the process of developing a Symfony 3 Application with Vite and Vue3 integrated with TypeScript. To replace Symfony's Webpack Encore, I opted for the Vite Buildtool using this convenient plugin: https://github.com/lhapaipai/vite-bu ...

Serialize a web form to transmit it through Ajax requests

I am looking to utilize Ajax to send a form instead of using a submit button. In the code below, I have defined the form and added a jQuery function to handle the action when the CREATE BUTTON is clicked. During debugging, I found that console.log($(&ap ...

Omit certain components from the JQuery ListNav plugin

I recently incorporated the Jquery plugin for record filtration. I obtained this plugin from the following link: After successfully implementing the plugin, I encountered an issue where it was counting the headings along with the alphabet filters in my co ...

Route functions cannot be hoisted in the Express framework

Can someone shed light on why my Express routes aren't hoisted? I keep encountering this error: throw new TypeError('Router.use() requires middleware functions'); The error is not present in the following file: var express = requir ...

Storing TypeScript functions as object properties within Angular 6

I am working on creating a simplified abstraction using Google charts. I have implemented a chartservice that will act as the abstraction layer, providing options and data-source while handling the rest (data retrieved from a REST API). Below is the exist ...

Why is my React build's index.html coming up empty?

I've been working on a React app using Snowpack, and everything seems to be in order. The build process completes successfully, but when I try to open the index.html file from the build folder, the page appears blank. To temporarily resolve this issu ...

Troubleshooting: npx create-react-app displaying errors during installation

Encountering an error while trying to install create-react-app using npx. Seeking assistance on resolving this issue. My Node.js version is v16.14.2 and npm version is 8.5.0 Installing packages. This may take a few minutes. Installing react, react-dom, a ...

Why isn't my Vue2 data updating in the HTML?

Starting my journey with Vue, I have been finding my way through the documentation and seeking support from the Vue community on Stack Overflow. Slowly but steadily, I am gaining a better understanding of how to create more complex components. The issue I ...

jQuery image resizing for elements

I have successfully adjusted the images in the gallery to display one per row for horizontal orientation and two per row for vertical orientation. Now, I am facing a challenge in making the images scalable so they can resize dynamically with the window. A ...

The key you entered in local storage was not defined and the value associated with

Having an issue with my HTML signup form where the key is showing as undefined (email should be the key) and the value displays as [object Object]. Any help in resolving this problem would be greatly appreciated. Thank you. <!DOCTYPE html> <html& ...

Adjust the primary scrolling section of a webpage to halt once it reaches a specific distance from the bottom of the viewport

I am facing a situation where I need to ensure that when scrolling down, a fixed pink menu bar at the bottom of the page does not overlap with the main blue content. This can be achieved by treating the blue content as an iframe positioned 60px from the bo ...