WordPress.org

Forums

TablePress
[resolved] Large database not loading in firefox (23 posts)

  1. mbsmeltzer
    Member
    Posted 3 years ago #

    wp-reloaded and the new tablePress won't load my larger tables (about 4000 lines). I get the following error message:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/content/06/9125906/html/wp-includes/formatting.php on line 239

    Of course, when I remove the table from this page, the page loads. Browsers chrome and safari don't seem to have this problem.

    Any Suggestions?

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    I'm a little bit confused about this error message. What sometimes happens with large tables like that is that the available memory is not enough, so that the PHP Memory Limit is reached. But in your case, the allowed PHP execution time apparantly was not enough...

    Can you maybe post the link to the page with the table? Maybe I can spot something that could be causing this. My assumption however is that the table might just be too big for your server, to be handled nicely.

    If you are lucky, the current development version of TablePress, which contains some optimizations to use less memory, could help here. You can get it from http://tablepress.org/download/tablepress-dev.zip and itthe folder in the archive needs to replace your current "tablepress" folder in the plugins directory on the server. Note that this requires WordPress 3.5.

    Regards,
    Tobias

  3. mbsmeltzer
    Member
    Posted 3 years ago #

    I manually replaced the tablepress folder on my server with the one from above, but it's still not working.

    Here is the link to the page causing the problem:

    http://competitivetiming.com/2012-missoula-marathon-searchable-results-finish-video-links/

  4. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for the link.
    I can confirm that loading is very slow, and sometimes stops with that error message.

    I'm sorry to say it, but this is a case where the used way of showing the table is just not optimal. A table like this with over 4,000 rows and 15 columns means over 60,000 cells to handle. This can unfortunately get very slow, and in your case also results in a total file size (of the page with the table) of over 2.5 MB. This is a lot of data to transfer, especially on slow internet connections.

    As I can imagine that you're planning to use more large results tables like this on the website, I strongly recommend that you switch these large tables to a custom PHP/mySQL solution, and only use TablePress for smaller tables.
    This will give you the advantage that you can use other loading methods of the DataTables JavaScript library (so that you can still benefit from the sorting/search/pagination features), namely the AJAX loading that is described in the examples in the right column of http://datatables.net/examples/ Unfortunately, I don't have experience with this, so I can't really help with that. :-(
    In the long run, this is the best solution, as you'd just suffer from a slow site if you create more tables like this in TablePress. I'm afraid that such large amounts of data are just too much for TablePress to handle directly.

    Regards,
    Tobias

  5. mbsmeltzer
    Member
    Posted 3 years ago #

    ...also, it looks like I lost the download options (excel,pdf,csv,print). Is that gone in the new version?

  6. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    no, these are not gone, they were just moved. Due to their complexity, I opted to make these available as a so-called TablePress Extension, which is basically a plugin for TablePress. To use that, just install and activate http://tablepress.org/download/extension/tablepress-datatables-tabletools.zip just like a regular WordPress plugin. After that, just change the table's Shortcode from something like

    [table id=123 /]

    to

    [table id=123 datatables_tabletools=true /]

    Regards,
    Tobias

  7. bbenton
    Member
    Posted 3 years ago #

    I too need a custom solution as I have 6 col and 64K rows. Has anyone come up with anything or started in on a custom project? I am looking for any suggestions or anyone that might want to collaborate with a developer. I just need something fast... :)

  8. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for your post.

    Unfortunately, a table with 8 columns and 64,000 rows is too much for TablePress to handle, sorry.

    Your best bet (for quick results) might be to simply offer an Excel or PDF file with the data for download. Otherwise, you'll need to develop a custom PHP/mySQL solution. There probably won't be a readily usable solution for this, as requirements of such custom solutions usually differ too much.
    To get started, any PHP/mySQL tutorial should help, as they all contain and describe methods for database access.

    Regards,
    Tobias

  9. bbenton
    Member
    Posted 3 years ago #

    Thank you Tobias... I will say use TablePress for my smaller files and love working with it. A job well done, thank you.

  10. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks, great to hear that you like it!
    And sorry that I couldn't really help with the large table :-(

    Best wishes,
    Tobias

  11. BrianCrinion
    Member
    Posted 3 years ago #

    Tobias,

    I'm finding similar slow results for large race results on http://www.IrishTriathlon.com Sometimes we'll have 2000 rows by 10 or 12 columns.

    When I run P3 Plugin profiler, it shows that TablePress takes up 81% of the total time to load all plugins. If I simply give the download an excel copy of these 20-30 large tables out of 500+ tables on TablePress, should I expect to see an improvement in the TablePress load times?

    Brian.

  12. BrianCrinion
    Member
    Posted 3 years ago #

    Tobias,

    I took out the largest 10 tables (from csv files from 70kb up to 250kb).

    The p3 plugin profiler now has tablepress down from 80% to 8% of the plugin load time.

    However i couldn't get the table tools to work with your extra plugin and the [table id=123 datatables_tabletools=true /]

    Brian.

  13. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Brian,

    thanks for your post!

    Sorry to hear that you are also running into slow results. Is (or was) this more on the frontend or in the admin area?

    And thanks for mentioned P3 Plugin profiler. I don't know that plugin yet, but it sounds interesting. I'll definitely give it a try. Maybe I can use it to add some optimizations to TablePress.

    As your results show, moving the largest tables from TablePress to a file download did indeed result in a better performance. The reason probably is that these large tables take up a lot of memory and processing time. Good to see that the P3 Plugin helped you in discovering this!

    About the TableTools: Did you install (and activate!) the Extension for this? The Shortcode looks correct, so I can then only assume that there's a JavaScript problem somewhere. If you post the link to the page with the table, where this is not working, I'll gladly take a look.
    I need to add a warning though: You might want to read this announcement about the recent update in TablePress' predecessor WP-Table Reloaded. If you connect the dots, you'll understand why I'm currently recommending to not use TableTools, and why it's not advertised on the TablePress website. (If you have questions about this, please drop me an email.)

    Regards,
    Tobias

  14. mbsmeltzer
    Member
    Posted 3 years ago #

    back to the datatables-tabletools plugin. I have the extra plugin activated and when I change the code as suggested it doesn't work. It also takes away the pagination feature. Any ideas?

  15. mbsmeltzer
    Member
    Posted 3 years ago #

    Here's a link where it's not working:

    http://competitivetiming.com/rth/

  16. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    your site seems to be suffering from a problem that I have now seen twice on other sites:
    http://wordpress.org/support/topic/alternating-rows-sometimes-not-working
    http://wordpress.org/support/topic/datatables_fixedcolumns-seems-to-break-horizontal-scrolling
    Unfortunately, we weren't yet able to find a cause.

    As it seems, for some reason, the Shortcodes are evaluated twice. Due to that, the JavaScript code is added to the page twice (which you can see near the bottom of the HTML source of the page). However, it should only be there once, as the second instance causes an error.

    I'm very sure that this is caused by either your theme, or another plugin that somehow evaluates all Shortcodes on a page (internally, but without printing their output to the page).
    To confirm this assumption, can you temporarily deactivate all other plugins, except TablePress and the TableTools Extension, and switch to the WordPress default theme Twenty Twelve? Then check if the table features work again, please.

    (As a side note, an unrelated to your specific issue, but related to TableTools: Please see my previous post in this thread, with some information about the availability of TableTools.)

    Regards,
    Tobias

  17. mbsmeltzer
    Member
    Posted 3 years ago #

    Sorry. I'm not interested in switching my theme to test. Wp- table reloaded worked just fine. I will switch ba k to that plugin until issue is resolved.

  18. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for your reply. I know that this might be tedious and inconvenient work, but I don't see another solution :-(

    WP-Table Reloaded is outdated, and I can no longer support it. I strongly discourage you from switching back!
    We should instead really try to find the cause for this. My assumption is that it's a JavaScript conflict between a plugin and the DataTables JS library that TablePress uses, or the theme and that JS library. But to test this, we'll need to do this temporary changes... And it's not like that the issue will resolve itself, as we don't even know where the issue comes from. If it really is in another plugin or the theme, we will never find out without testing.

    Regards,
    Tobias

  19. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    good news! :-) The DataTables TableTools Extension is back! You can get the Extension at http://tablepress.org/extensions/datatables-tabletools/

    Best wishes,
    Tobias

  20. mbsmeltzer
    Member
    Posted 3 years ago #

    Great! This extension seems to be working. Thank you. Only a bummer that I have to go back and edit the code for every single table link that I want to have this feature. Also, on the last version you had it so that when someone hovered over the options, a text box appeared detailing what that button would do. Can you bring that feature back?

  21. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    good to hear that the Extension is working :-)
    Yes, you'll have to edit every Shortcode that shall use this. The alternative would be to edit the code and enable the functionality for all tables by default. You would then basically have to add the Shortcode parameter to all tables that shall not use the Extension.

    About the "text box": I'm not really sure what you mean hear, but I guess you are refering to those small yellow tooltips. Then I have to disappoint you. As those would have to (re-)added in the external TableTools JavaScript library, there's nothing that I can do here :-( Sorry.

    Regards,
    Tobias

  22. mbsmeltzer
    Member
    Posted 3 years ago #

    Thank you Tobias. I'm sure I can live without the yellow tooltips. Any chance you could help with changing the code to enable the functionality for all tables by default?

  23. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    sure, just change line 24 in the file "tablepress-datatables-tabletools.php" from

    $default_atts['datatables_tabletools'] = false;

    to

    $default_atts['datatables_tabletools'] = true;

    That will enable the feature on all tables by default. To then disable it again on certain tables, add the Shortcode parameter datatables_tabletools=false to that table's Shortcode.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.