Why data is loading slower in LIVE website?

Why data is loading slower in LIVE website?

iftikharuddiniftikharuddin Posts: 18Questions: 5Answers: 0
edited January 2019 in Free community support

I'm trying to load data from a table which contains 3k records. Data loads very fast in local server but when i deployed my code to server (live website) it takes 20-30 seconds to load the whole data.

My code:

```ajaxUrl: '<?php echo $this->MyHelper->Route('admin-get-blog-articles-faq')?>',
        columns: [
            { data: 'question' },
            { data: 'created_at' }

Table code:

```<table id="records-table" class="table table-striped table-bordered" width="100%">
                                        <th class="hasinput">
                                            <input type="text" class="form-control filter" placeholder="Question">
                                        <th class="hasinput">
                                            <input type="text" class="form-control filter" placeholder="Date Created">
                                        <th class="all">Question</th>
                                        <th class="all">Date Created</th>

Controller func:

```public function getBlogArticlesFaqAction() {

    //Get all Blog Articles FAQ from DB
    $blogArticlesFaq = BlogArticleFaqModel::getAllForDataTable(array('id', 'question', 'created_at'));

    // Return data array
    return array('data' => $blogArticlesFaq);


  • colincolin Posts: 8,661Questions: 0Answers: 1,449

    Hi @iftikharuddin ,

    It could be any part of the process:

    1. the client I assume is the same, so can be ruled out
    2. is the network slow to/from the new server?
    3. is the database slower? indexes? other usage?
    4. is the server itself the same spec? and being used elsewhere?

    The best bet is to profile each of those and find the differences.



This discussion has been closed.