Link to home
Start Free TrialLog in
Avatar of Jazzy 1012
Jazzy 1012

asked on

make datatables faster to load

I have this code:
<p>
<?php echo Html::anchor('admin/reports/download/customerprofile/csv', 'Download CSV'); ?> 
</p>
<?php if ($columns && $rows): ?>
<table class="table table-striped" id="list-table">
  <thead>
    <tr>
    <?php foreach($columns as $key => $label): ?>
      <th><?php echo $label; ?></th>
    <?php endforeach; ?>
    </tr>
  </thead>
  <tbody>

  <?php foreach($rows as $row): ?>
    <tr>
    <?php foreach ($columns as $key => $label): ?>
      <td><?php echo $row[$key]; ?></td>
    <?php endforeach; ?>
    </tr>
  <?php endforeach; ?>  
  </tbody>
</table>

<?php else: ?>
<p>No Customers.</p>

<?php endif; ?>

Open in new window


As you can see I am using fuel, however the data is about 874 pages (im using datatables) and it takes forever to load. I found there is a way to load each page on its own with server-processing, but i'm not sure how to to the server-processing script since the query is from many tables, and the columns arent exactly shown, any ideas on how I can make the loading faster?
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial