With lot of columns 20 sec to load
With lot of columns 20 sec to load
sandro33
Posts: 5Questions: 2Answers: 0
Hi everybody,
I use Datatable with 100 to 300 rows max but with 80 columns.
On the load i have 20 seconds to wait ...
Techno : php, mysql.
How can i reduce this time ?
I have "just" 10 columns that need to be order.
Thanks for the help
Sandro
This discussion has been closed.
Answers
I would start with determining if the delay is with the server querying the information or with Datatables displaying the info. Probably start with looking at the network response time within the Developer Tools of your browser.
I don't have anything terribly slow but have one table that takes 1.5 to 2 seconds to load. Monitoring the network tab of the Developer Tools I see it takes around 250ms to retrieve the data then it takes an additional 1 to 1.5 seconds to display. I have a lot of rendering happening for that table which is the delay.
Take a look and let us know what you find. And provide more details regarding the problem area if you still need help.
Kevin
Hi,
Thanks, i see that there was lot of time for recalcul styles. I correct this.
I understand that there is a lot of time to display the big table ( average 8.5 seconds ).
But when all is display (near 10 seconds), there is between 6 and 10 seconds to display the pagination and do something else.
I was thinking that this is the load time jquery to record all columns and rows to search and ordering ... Then the question (it's possible to remove column to this process and win time ?).
I print in a jpg the chrome performance report ....
Many Thanks
Sandro
Can you link to the page showing the issue so we can profile it? That few rows really shouldn't be much of an issue.
Allan
Ok thanks for the response Allan,
Here is the test adress and account
http://www.actiaweb.com/inventaire/main.php
datatable
net
toto55
Click on "Ordinateurs"
And you arrive in the table with near 90 columns etc ...
You will see in the "console" of your navigator the time for each row and after many seconds ....
Thanks
Sandro
Hi,
no idea guys ?
Thanks
Try enabling
deferRender
as follows:Also loading time can be greatly reduced if you remove all the
input
andselect
nodes and return only data in table cellstd
. You can generate content for the cell on the client usingcolumns.render
option instead.For example, for "Processeurs" (4th) column:
See more articles about jQuery DataTables on gyrocode.com.
It looks like the table is DOM sourced, so the
deferRender
option isn't going to help in this case I'm afraid. All the DOM elements already exist, so there is no benefit in attempting to delay them being created.The HTML is not valid on the page - which isn't going to help. And the huge number of
console.log()
statements won't help either - they are really slow.Could you fix both of those and let us know then I'll try to profile it again.
Thanks,
Allan