Loading 12mb
Loading 12mb
Hi, I purchased a license a couple of days ago. And very happy with it.
On my test environment, I have no problems loading 12mb (13k rows)
On my clients server which is not as high spec as mine, I have problems. Can't load beyond 4.4mb. I can increase the executing time. But this is really slow.
How can I let it load dynamically or like 1k at a time and flush the memory.
I did a test with ssp.class.php did a join with 4 other tables, and the loading speed was very quick.
However using join.php template is just very very slow.
Any help would be great, please push me in the correct direction.
This question has an accepted answers - jump to answer
Answers
btw, if the join function is important below is what I have done.
->leftJoin( 'sw_gm_prices', 'sw_gm_prices.feed_id', '=', 'sw_gm_feed.id' )
->leftJoin( 'sw_gm_shipping_prices', 'sw_gm_shipping_prices.feed_id', '=', 'sw_gm_feed.id' )
Are you using server-side processing? If not I would suggest enabling it! Example here.
12MB of data is a huge amount for a single page :-). Server-side processing should split it up nicely.
Regards,
Allan
Hi Allan,
Yes it is server side, am I doing something wrong?
the php file
// DataTables PHP library
include( "../../bootstrap/php/DataTables.php" );
// Alias Editor classes so they are easy to use
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Join,
DataTables\Editor\Validate;
I just notice, I mist out on serverSide: true,
But than I get the following error
DataTables warning: table id=products - Unknown field: (index 0)
Sorry for the nooby questions.
Ok, so I now know it's because the editor does not match, as I have added a custom checkbox column, I'm trying to figure out how to get the editor to play nice? Can I assign an empty field?
Hi, Last question :)
I have gone through my coding and did it step by step.
I found that I moved my checkbox to the last column, that it works. Why is that?
As I would like to understand what i'm doing wrong. But it works now, loads in seconds, not minutes :D
You are getting the error:
on the checkbox column because of:
i.e. there is no data associated with that column on the server-side. Given that it is a client-side input there probably shouldn't be, so the correct thing to do would be to use
columns.orderable
to disable the ability to order on that column.Allan
That did not seem to work, I disabled the checkbox sorting.
But it's ok I simple moved it to the last column. I love your app, it's making my APP's capabilities so much better and nicer.
Thank you for such a great tool!
If the checkbox is in the first column you would also need to change the default ordering which is controlled by
order
.:-D
Allan
Ahhh, that makes sense.
Thank you every so much for your replies. :)
Kind regards,
Emmanuel.