⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Datatable



Robert
  • profile picture
  • Member

Posted 27 September 2013 - 08:14 AM

Is there a way to mod the datatable to be able to use it on a table with big number of records ? 


davidoster
  • profile picture
  • Member

Posted 27 September 2013 - 10:00 AM

How big? The datatable theme handles thousands of records easily because of the ajax processing it does. If you need milions then see this.


Robert
  • profile picture
  • Member

Posted 27 September 2013 - 10:37 AM

Then im doing something wrong ... at 10k until it load all the records you need to wait a loot .. and it loads all the records is that normal ?

 

Edit :

 

q2 : how can you set the tamplate to be in a div to be width : 100%; to not move off screan ?


Robert
  • profile picture
  • Member

Posted 28 September 2013 - 10:25 AM

Anyone ?


davidoster
  • profile picture
  • Member

Posted 29 September 2013 - 06:50 AM

You should know by now, after all these questions you have done on this forum that if you don't share your code and table structure it is impossible for anyone to be able to help you!


Robert
  • profile picture
  • Member

Posted 29 September 2013 - 19:54 PM

Well i didn't see a point to that since i was using the basic model for tests but here is a more detailed description 

 

1. for the first question

 

function test()    {
$crud = new grocery_CRUD();

$crud->set_theme('datatables');
$crud->set_table('aaaaa');
$crud->set_subject('aaaaa');

$output = $crud->render();

$this->_main_output($output);
}

 

table was 5k records - using CI benchmark  - load time ~  4.3218  memory ~ 26.99MB on localhost 

until all the info was send to the browser the browser was non responding

 

 

2. for the second question

 

 

<div class="container_main">
<?php echo $output; ?>
</div>

 

 

.container_main  {

.....

width :xxx px;

}

 

still the table didn't stay in the parameters ..


davidoster
  • profile picture
  • Member

Posted 30 September 2013 - 06:24 AM

How many fields the table has and how big these fields are? Why don't you share the table structure?

5000 records isn't too much at all. Load time seems a bit too much but this depends also on the processing power of the PC(or server) you are using.

27MB of memory depicts what I was saying before. You might have many fields within the table or big fields or both. This could justify longer latency.

If it is not that and you are using this on a localhost (at your pc) then you need to optimize PHP and MySQL configuration. There is plenty of information about PHP and MySQL optimization on the internet an probably it is beyond this forum.

 

For the 2nd question I am not sure if it can be done because this is integrated to the way that the theme works.

You need to check for the specific theme (flexigrid) from the looks of it.


Robert
  • profile picture
  • Member

Posted 30 September 2013 - 13:49 PM

Thanks for the replay. I didn't post DB structure since i use for the test a basic structure ..

1. int auto-increment pk, 4 varchar 60, and 2 int 10 fields. The test was made on localhost on server the numbers are lower but still ....

Is it normal to send all the info to the browser ?