how to reduce the table loading time when more data
how to reduce the table loading time when more data
SandeepMurala
Posts: 48Questions: 13Answers: 0
in General
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
This section of the FAQ should help, it discusses various techniques to improve performance,
Cheers,
Colin
Hi ,
I am using mongodb database, I am using induvial column search datatable as shown here https://jsfiddle.net/dipakthoke07/ehhfsrfq/2/.
Now I have 15 columns and more then 2k or 5k data (records) ,it might be 10k also,
problem is when i refresh the page table is taking more time to load and fit in page , the time is taking more then 20 sec ,if it will be more then 10k records ,the loading time will increase more,
How can I reduce the time to loading .
Please do help on it .
Thanks
Sandeep
@colin Thanks for your response ,I have checked that FAQ but I did not get my Ans please help on it .
thanks
sandeep.
Your test case is using DOM sourced data, is that the data source for Datatables in your environment?
Please provide more information of what you have and where the delay is, ie, is the delay in fetching the data from the server or rendering the data. The FAQ Colin linked to provides the options available depending on the where Datatables gets the data from and where the delay is at.
Kevin
@kthorngren thanks for your response.
if we use mysql database we can user
server side scripting
,that I have done by usingserver.php
andssp.class.php
and home page, with that I did not get any issue, It was working fine, I was able to manage more then 10k records within 10 sec.But now I am using Mongodb and my select query is shown below
by using above query I am fetching records and here records count is more then 3k ,
after few days it i will go more then 10k also, to load this data in to table is taking more then 30 sec or more I can and I created indexes also mongodb ,
still same issue,
And I am using induvial column search datatable as shown here https://jsfiddle.net/dipakthoke07/ehhfsrfq/2/,
In this induvial column search I have written some custom js code like in individual data search I can search range wise like if age is there ,I can search like in age column
2-5
,I will get in between 2 to 5 ,so like this i applied few of the columns and if it is text column we can search like ``test|test1|test```.How can I fix this loading issue please do help on it ,that is going to helpful for me.
Thanks
Sandeep
In this case you are using server side processing. All of the searching, sorting and paging functions are controlled by the server script, ssp.class.php for example.
You will need to do something similar with your mongo db to fetch only the records for the current page displayed. See this thread.
Kevin