Okay
  Public Ticket #2841613
charts load very slowly
Closed

Comments

  • IW started the conversation

    hi, I use a Google Sheets file (with real time data and several internal sheets divided by tabs) to create a wpdatatable (linked). I only use one of those sheets in the same file to create a wpdatatable via API. Then that wpdatatable is used to create a wpdatachart. 

    When a page with the chart loads, however, it takes 8-12 seconds for Chrome to load it. It's painful.

    When the chart is not in the page, loading time is no problem. The chart only reflects a wpdatatable with about 50~100 rows and a few colums. So not very big data.

    Is this a common issue? What can I do to improve loading speed?

    By the way Google Sheets file is usually made up of several different sheets that work together. Is it better to use a totally separate worksheet that imports data from other sheets? The reason I'm asking is I don't know whether wpdatatable imports ALL the sheets within a Google Sheet file, which could  take up a lot more time than when it imports from only one single sheet.

    (Also, the page often runs into a critical error, too. Would turning API off resolve the issue?)
    Thanks for any help. 




  •  2,507
    Aleksandar replied

    Hi there.

    The table being this small shouldn't cause any issues. The chart is loading a wpDataTable, not the source file (Google Spreadsheet) so the connection between our plugin and Google Spreadsheets is only established once - when the table is generated on the page.

    An Admin-Ajax call, however, is then being run to generate the chart, so I suppose that could increase the loading time, but 8 - 12 seconds seems too much for me.

    Try turning off the API, and see if that helps. wpDataTables can only read the first tab, so it is not going into other tabs, and that can't be increasing the loading times.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • IW replied

    Thank you Aleksadar. 

    Thinking that the API connection may be causing the delay, I made my Google sheet open to the public completely and published it before I linked to wpdatatable to see if this would increase the speed. It did, but not significantly. Its loading time is still long.

    Do you mean turning off the API from the settings of the wpdatatable plugin? I have some google sheets that should not be accessed by everybody but should be  only accessed by a logged-in user of my site. So it's necessary to have it on.

    Is there an alternative way? like turning off the admin-ajax call? 

    thanks





  •  2,507
    Aleksandar replied

    Hi again IW

    Unfortunately, there's not much you can do to increase the loading speed. If you have some caching plugins, try disabling them on pages where the tables and the charts load.

    Another option would be to increase the memory limit in your php.ini file on your server, but I don't know if your hosting provider will allow that. Turning off the admin-ajax call would render the chart useless.

    If you need the API to remain on, you can't turn it off only for some Google Sheet tables.

    I actually don't see any admin-ajax calls being made by wpDataTables, and that's logical since the Google Sheets-based tables are non-server-side tables, so there's no admin-ajax call. The number of charts you have on the page, however, may cause the loading time to increase, as Highcharts is loading its JS for every chart. 

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables