Problem updating callback

Good afternoon, i am new to dash and i am struggling with a callback function in which it sais it has updated an output while it has not, so i just wanted to know if i am doing something wrong or there is a limitation in the callback function. In my code when i call a callback, a script is run, and depending on the inputs i have given, the script i am calling takes more or less time to compile. When this script takes more than a certain amount of time, callback stops sending the update

Lets see if someone can help

app = dash.Dash(name)

def function(name):
resultado_preliminar = pd.read_csv(str(name))
# columnas=resultado_preliminar.columns[1:]
resultado_preliminar.loc[:,[‘optimal_ES_flag’,‘optimal_NET_flag’]]=resultado_preliminar.loc[:,[‘optimal_ES_flag’,‘optimal_NET_flag’]].astype(str)
resultado_preliminar=resultado_preliminar.to_dict(‘rows’)

 #hack
for dict_value in resultado_preliminar:
    # for x in dict_value:
    for k, v in dict_value.items():
        # for k, v in x.items():
        if(type(dict_value[k])!=str):
            
            dict_value[k] = round(v, 3)

# os.remove(str(name))
return resultado_preliminar

resultado_preliminar=function(‘resultado_optimizado.csv’)

data=auxiliar(resultado_preliminar)
app.layout = html.Div([
html.Div(
dcc.Checklist(id='checked,options=options,values=[‘5’,‘8’] )
),
html.Div([
dcc.Input(
id=‘adding-center’,
placeholder=‘Enter a center…’,
value=str(DE),
style={‘padding’: 10,‘marginTop’:‘5%’})]),

html.Div([
            dcc.Input(id='adding-frame',placeholder='Enter variation frame...',                    value=str(max_bracket)] ),
html.Div([html.Button('Calcular', id='adding-rows-button' ),

html.Div([html.Button('Exportar y mostrar', id='execute', n_clicks=0)]),
        html.Div(id='optimizer', style={'display': 'True'})  
        ,html.Div('', style={'textAlign': 'left', 'marginTop':'10%'})

    ], style={'width': '24%', 'display': 'inline-block','vertical-align': 'top'}),

html.Div([html.Div(
                children=   dash_table.DataTable(#id='data_table',
                                        columns=[{"name": i, "id": i} for i in columnas],
                                        data=data,

                                                })),
                

                ],style={'width': '70%','margin-left': '80px', 'display': 'inline-block','vertical-align': 'right'})
],style={'width': '100%', 'display': 'inline-block'})

@app.callback(
Output(‘data-table’, ‘data’),
[Input(‘adding-rows-button’, ‘n_clicks’),
Input(‘adding-center’, ‘value’),
Input(‘adding-frame’,‘value’),
Input(‘checked’, ‘values’)
])
# [State(‘adding-rows-table’, ‘data’)
# ])
def filter(n_clicks, value1, value2, value3):

if int(n_clicks-clicks.click)==1:
# if n_clicks!=0:    
    clicks.click=clicks.click+1
    print(clicks.click)
    
    define and run mi script, with the inputs given, and obtain a dataframe
   
                
    return dataframe.to_dict('rows')

if name == ‘main’:
app.run_server(debug=True, port=8080) #8080

Thank you for your time