Loading return lag

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.


    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.