# Loading return lag

**URL:** <https://community.plotly.com/t/loading-return-lag/53141>\
**Category:** Dash Python\
**Created:** [May 20, 2021, 7:11pm UTC](https://community.plotly.com/t/loading-return-lag/53141 "2021-05-20T19:11:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tphil10](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/tphil10/32/19868_2.png) [@tphil10](https://community.plotly.com/u/tphil10)\
**Post date:** [May 20, 2021, 7:11pm UTC](https://community.plotly.com/t/loading-return-lag/53141/1 "2021-05-20T19:11:18Z")

</div>

Afternoon!  
I have a fairly large table i’m loading (~3k rows) into my layout. When that table initially loads, the `dcc.loading` animation shows up and everything seems to be ok. However, when i hook an input up to it and filter down on the dataframe that build that table, the table remains for a few seconds and the loading animation only shows up at the very end of the callback for a split second.

I timed the actual callback and the query, dataframe generation and the building of the actual table (i’m using dash-bootstrap-components) is taking less than a second to get to the callback return. Once it hits the return its taking an additional 2-3 seconds to populate and the loading animation only showsup for a split second at the end.

I was under the impression the loading animation should show up at the start of the callback and empty whatever output i have the callback pointed at.

```auto
            dcc.Loading(
                id='loader',
                children=[html.Div(id='quantity-tbl-div')]
            )

@app.callback(
    Output(component_id='quantity-tbl-div', component_property='children'),
    
    [Input(component_id='prod-select', component_property='value'),
     Input(component_id='store-select', component_property='value')]
)
def update_page(input_product, input_store):
     #Logic to build table rows
     return dash_tbl

```

Any help would be greatly appreciated.
