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

Creating a sticky v-stepper-header while scrolling in VuetifyJS

Can anyone help me figure out how to make the <v-stepper-header> component stay sticky when scrolling? I attempted to create custom CSS for this but was unsuccessful. Below is a snippet of code that I tried: <v-stepper v-model="step"&g ...

PHP Dropdown List - Default option should be set to "all" (or "Alle")

My website displays data to users based on the State they reside in, with a filter provided through a drop-down list allowing them to select any specific State or view data from all States. Currently, the default selection shows the user data from their ow ...

Limit the radio button to being clickable

Ugh, I'm really struggling with this. I want to create a quiz where only the radio button is clickable, not the text itself. Can anyone help me figure out how to do this? I have two codes below that I don't quite understand. I'll include th ...

The issue of Next.js redux useSelector causing HTML inconsistency

Currently, I am utilizing Next.js for the development of a React application. In order to manage the state, I have integrated redux along with redux-toolkit. A peculiar error has surfaced in the console with the message: Warning: Did not expect server H ...

Using HTML, jQuery, and JSON with an AJAX call to populate two web tables stacked on top of each other

I am encountering an issue with populating two tables using two searches based on user input in mySQL-JSON-AJAX. When the user enters a search term and clicks the corresponding button, data should populate the respective table. The problem arises when clic ...

Code not functioning properly in Internet Explorer

In one of my JavaScript functions, I have the following CSS line which works well in all browsers except for IE (Internet Explorer). When the page loads, the height of the element is only about 4px. element.setAttribute('style', "height: 15px;") ...

Ways to create a fixed button positioned statically at the bottom of a page

Currently, I am utilizing tailwind CSS to create a webpage with Next and Back buttons for navigation. However, an issue arises when there is minimal content on the page as the button adheres to the top. For visual reference, please view the image linked be ...

Unable to select image inside linked container

I'm attempting to display a dropdown menu when the user clicks on the gear-img div using jQuery. However, because it's wrapped inside an a tag, clicking redirects me to a URL. I also want the entire div to be clickable. Any suggestions for a solu ...

PHP failing to retrieve information

Having trouble with this specific file as it seems to be missing data in the address fields. Additionally, whenever "notes" are inputted, the Address data disappears. Any thoughts on how to resolve this issue? <tbody> ' ; $message .=&a ...

Challenges with unique scrollbar designs and dynamic tab loading using AJAX

Hello to all amazing members of stackoverflow, I'm facing some major challenges getting my custom scrollbar to function properly with ajax-based tabs. Any assistance you can provide would be immensely helpful. I have most of it set up and operational ...

Show items in the sequence of clicking

Is there a way to display elements in the order they're clicked, rather than their order in the HTML using jQuery? For example: CSS code: .sq{ display:none; } HTML Code: <a href="#" id="1">A</a> <a href="#" id="2">B</a> ...

Create a custom npm package that is compatible with frontend environments like create-react-app. Ensure you have a suitable loader in place to handle the specific file type of the module

After developing a node module and releasing it as a node package, I encountered an issue when trying to use it in frontend applications (specifically with a 'create-react-app'). The error message that appeared stated: Module parse failed: Unexp ...

Show the components only if the final digit in their identification number is less than i

I have several span elements with IDs like "tag1", "tag2", etc. I want to display only the spans whose ID ends with a number less than 19. These elements are part of a class called "notVis", which is hidden by default using $(".notVis").hide(); when the ...

Having trouble with JSONP cross-domain AJAX requests?

Despite reviewing numerous cross-domain ajax questions, I am still struggling to pinpoint the issue with my JSONP request. My goal is simple - to retrieve the contents of an external page cross domain using JSONP. However, Firefox continues to display the ...

What is the reasoning behind the return type of void for Window.open()?

There is a difference in functionality between javascript and GWT in this scenario: var newWindow = window.open(...) In GWT (specifically version 1.5, not sure about later versions), the equivalent code does not work: Window window = Window.open("", "", ...

Exploring Angular controller inheritance and the ability to override methods from a superclass

Is it possible to call a function on the superclass controller when extending a controller in Angular and overriding a function? To illustrate with an example in Java: class Foo { void doStuff(){ //do stuff } } class FooBar extends Fo ...

Tips for choosing a particular value in an HTML <script> query

Can someone please help me figure out how to select specific values in a form using a query? I'm trying to extract certain values like Hello and Lorem ipsum..., as well as Hi and Nullam fringilla... from the Content.join(''); section. I apo ...

Move router parameters to separate files to streamline and organize code

I have encountered a bit of an issue. I currently have the following code in my routing.js file where I define both my parameter and route. I have moved the routes to a separate router instance in my routing.js file, but I am struggling to separate the par ...

Upgrading to NPM version 7 or higher: A guide to effectively installing packages using the "lockfileVersion" parameter: 1

After upgrading NodeJS to version 16, I noticed that NPM version 8 is now included. This means that when I install packages, the package-lock.json file is generated with a "lockfileVersion": 2. However, I prefer the older format of "lockfileVersion": 1. ...

Video Autoplay within an image carousel - A seamless integration

I need assistance embedding a YouTube video as the fourth item in a slideshow on my website, www.serenitygardenrooms.com. The slideshow should play the first three images and then autoplay the video before moving on to the next image. However, the code sni ...