Can I improve the speed, 50,000 records - straight from text file.

Can I improve the speed, 50,000 records - straight from text file.

usedlensusedlens Posts: 15Questions: 5Answers: 1

https://usedlens.co.uk/

This is my website with 50,000 records - currently shown to be using ajax and a coldfusion cfc to retrieve data. It can take a good 10-15 seconds to retrieve the data.

As a test I output the JSON to a text file and used that as the source, it takes 8-11 seconds whereas on my development server I get <250ms.

I did try server side process, but the responsiveness was poor at 3-4 seconds for every action such as pagination.

So back to ajax, is there anything more I can do to make this faster?

var resultsTable = $('#resultsTable').DataTable(
{
'serverSide': false,
'deferRender': true,
'ajax': {
'url': 'thedata.txt'
},
'columns': [
{ 'data': 'productname' },
{ 'data': 'price' },
{ 'data': 'retailersite' }
],
'columnDefs': [
{ "targets": [1,2], "searchable": false },
{ "width":"10%","targets": [1]},
{ "width":"20%","targets": [2]}
]
}
);

Answers

  • usedlensusedlens Posts: 15Questions: 5Answers: 1

    I actually retried using serverside processing, and found out there was a slow query causing a 2 second delay

    I'm all good now!

This discussion has been closed.