Limits to TablePress?
-
Hi, Tobias:
I have built a website that currently has about 250 Tables (each about 10-50kb in size, avg. 20-25kb). Is there a physical, or desirable, limit at which TablePress, or WordPress for that matter, will either be unable to accept more, or will show serious performance issues? I plan to add another 500, and possibly another 300-500 every quarter.
Thanks for your response,
Ganaxi
-
Hi, Tobias,
Forgot to add, the show X entries box at the top of the table does not work either, whether you change it to 10/100/.. – the output is still always the default 10 rows.
Thanks,
Ganaxi
Hi,
ah, yes, I can see what you mean. The reason for this is that TablePress uses a more recent version of the JS library than WP-Table Reloaded, and the default CSS is designed for that newer version.
To fix this, we need to tell WP-Table Reloaded to also use the new version. To do that, please addadd_filter( 'wp_table_reloaded_url_js_script', 'wp_table_reloaded_new_datatables', 10, 2 ); function wp_table_reloaded_new_datatables( $url, file ) { $url = plugins_url( 'js/jquery.datatables.min.js', TABLEPRESS__FILE__ ); return $url; }
to the functions.php (or the Extension that you already have).
Regards,
TobiasTobias,
Thanks for the prompt reply.
When I added the above extension, I got a fatal error, and the plugin is deactivated now.
Here is the complete extension file, in case I made some mistake in putting it together, per your instructions:
<?php
/*
Plugin Name: WP-Table Reloaded Extensions
Plugin URI: https://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/extensions/
Description: Custom Extensions for WP-Table Reloaded
Version: 1.0
Author: YOU, Tobias Baethge
*/// this is where the actual code goes
/**
* Changes Shortcode for WP-Table Reloaded from [table id=N /] to [[tabletoo id=N /]]
* @author Tobias Baethge
* @see https://tobias.baethge.com/2010/01/extension-3-changing-the-table-shortcode/
*/
function wp_table_reloaded_change_table_shortcode( $shortcode ) {
return ‘tabletoo’;
}
add_filter( ‘wp_table_reloaded_shortcode_table’, ‘wp_table_reloaded_change_table_shortcode’ );/**
* extension to replace wp-tables default CSS with tablepress default css
*/
add_filter( ‘wp_table_reloaded_table_css_class’, ‘tabletoo_add_tablepress_classes’, 10, 2 );
function tabletoo_add_tablepress_classes( $classes, $table_id ) {
$classes[] = ‘tablepress’;
$classes[] = ‘tablepress-id-‘ . $table_id;
return $classes;
}/**
* JS library fix for using Tablepress CSS when using WP-Tables Reloaded
*/
add_filter( ‘wp_table_reloaded_url_js_script’, ‘wp_table_reloaded_new_datatables’, 10, 2 );
functions wp_table_reloaded_new_datatables( $url, file ) {
$url = plugins_url( ‘js/jquery.datatables.min.js’, TABLEPRESS__FILE__ );
return $url;
}
?>This is the message I am getting:
This plugin has been deactivated because your changes resulted in a fatal error.
Parse error: syntax error, unexpected T_STRING in /nas/wp/www/cluster-1346/t…p/wp-content/plugins/wp-table-reloaded-extensions.php on line 36
Thanks,
Ganaxi
Hi,
argh, there was a typo in my code above (I already fixed it there). “functions” needs to be “function”. Sorry about that.
Please change that and re-activate the Extension.Regards,
TobiasHi Tobias,
I am still getting a fatal error, albeit a different one, as follows,
Parse error: syntax error, unexpected ‘)’, expecting ‘&’ or T_VARIABLE in /nas/wp/www/cluster-1346/t…p/wp-content/plugins/wp-table-reloaded-extensions.php on line 36
Thanks,
Ganaxi
Hi,
shoot, there’s another typo… I need to be more careful, I guess.
Please replace “file” with “$file”, in same line that already had the “functions” typo.Regards,
TobiasHi Tobias,
As they say,
third time’s the charm.Thanks,
Ganaxi
Hi,
ah, very good ?? I was afraid that there might be more typos… Guess, I was lucky this time ??
Best wishes,
TobiasHi,
good news: I added a code change to TablePress, that results in much less PHP memory being used on the “All Tables”, “Import”, and “Export” screens.
The dev version is available at https://tablepress.org/downloads/tablepress-dev.zip
With that, it should be possible to have much more tables in TablePress, without running into memory limits.Regards,
TobiasGreat! That is good news.
Thanks, Tobias, for addressing this limitation. It makes TablePress an even better plugin. And now maybe I won’t have to break-out my data between TablePress and WP-Tables.
My host will be testing this on the installation soon.
Hi,
great! Please let me know how things go!
Regards,
TobiasHi, I’ve seen that this plugin can’t manage large lists, well, I understand that limitations are defined by browser and local computer resources, but I have a couple of things to say ??
1.- I really used this plugin before and really ADORE IT since is so clean and useful, specially the search and so.
2.- I really want to try anything to import a 20.000 row CSV into this system. Can you point me to the conclusions for trying to do this manually? no matter how hard could be. But anyway, in case I can finish this, would I face any other issues related to server-side or computer problems in the front end ?And also a suggestion: If this problems are faced by the local resources, why don’t you add an option in the plugin admin page that loads by default the imported CSV in 10, 100 or 1…0 firsts rows and a variable so user can define how many rows would see in the backend ?
Sorry for my english …. very difficult for me to explain.
I hope you could understand me ??
Thanks for your excellent plugin !!!
Hi,
thanks for your question! Nice to hear that you like TablePress so much!
However, I’ll have to discourage you from trying this. 20,000 rows will not be fun. You might be able to successfully import this table, but you will then most probably not be able to edit it at all on the “Edit” screen, due to the large amount of textareas that the browser has to handle, and due to which your browser will be slow or even crash.
(If editing on the “Edit” screen is not a necessity, you might be able to use the trick from https://www.ads-software.com/support/topic/working-with-large-tables to hide the “Table Content” box, but that’s kind of ugly.)
Additionally, TablePress can only show the entire table on the frontend, which means that the entire data set has to be transmitted to the viewer every time, which can also be slow (depending on the amount of data in the table).Thus, a custom solution, based e.g. on a custom mySQL table that you run specific queries on with PHP should be a much better and more performant solution. Of course, you can still use the JS functions (sorting, search, …) on this by manually adding the DataTables JS library from https://www.datatables.net . All of this will require custom coding though…
About that suggestion: Yes, that’s what I’d love to do, but due to the internal data storage of TablePress, this is not easy to implement ??
Sorry for not having better news.
Regards,
TobiasHi, First i thank to you gave us a great plugin. Its really cool user friendly plugin. I need some help in this plugin customization. Is there any option to add tablepress import option into front end when guest add the post….Waiting for your reply. Thank you
- The topic ‘Limits to TablePress?’ is closed to new replies.