Table loading speed issue
Table loading speed issue
Hello
I am using this DataTables code to make my html/php based table that pulls its contents from a mysql database be interactive.
I like that a user can easily filter and search for specific content in the table with this jquery code. However I am having a speed issue. The table contains 3,100 rows of data which of course is spread out over multiple pages. However because of the quantity of rows the table seems to load really slow. I optimized my query and after running the query in a phpmyadmin to test the query speed I narrowed it down to this datatables jquery code that is causing the slowness.
So I am looking for suggestions on how to make the table load the contents faster. Any suggestions would be helpful
Thanks
I am using this DataTables code to make my html/php based table that pulls its contents from a mysql database be interactive.
I like that a user can easily filter and search for specific content in the table with this jquery code. However I am having a speed issue. The table contains 3,100 rows of data which of course is spread out over multiple pages. However because of the quantity of rows the table seems to load really slow. I optimized my query and after running the query in a phpmyadmin to test the query speed I narrowed it down to this datatables jquery code that is causing the slowness.
So I am looking for suggestions on how to make the table load the contents faster. Any suggestions would be helpful
Thanks
This discussion has been closed.
Replies
Allan
However I believe what I need to do is the serverside processing via Ajax/php/mysqli. However I am not sure how I would write the code.
First because my pages query has a join on three different tables and I do not see any clear cut way to use my query in the sample code seen here http://datatables.net/development/server-side/php_mysqli
Second I am not sure how to make the servside processing work.
My page with the table has this
[code]
Sys ID
Legacy ID
Client Name
Phone
Email
Updated On
YTD Pmts
Status
Agent
Checked In sys
Options
Loading data from server
[/code]
and at the very bottom of the page I have
[code]
$(function () {
$('#dt2').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "./clientlist_processing.php"
});
});
[/code]
My clientlist_processing.php is the code from
http://datatables.net/development/server-side/php_mysqli
However I am getting a error message saying Json data could not be parsed. This is caused by json formatting error. When I look at the page is firefox firebug I do not see any json data coming through. So I am not sure what I am doing wrong? When I go to the clientlist_processing.php page I get an error saying
Error loading character set "utf8": not sure what would cause that error and I am thinking it might be the issue. I tried commenting out the line that says mb_internal_encoding('UTF-8'); but that did not do anything
Allan