Marker colours on big time series + general questions

Hello,

I am working on a labeling tool and I have three questions.

The first one is that when I set all the marker colors to be black in the scattergl figure “marker=dict(color=“black”…” the performance is very good but when I pass a df column with colour values, the performance slows a lot when interacting with the plot (I have ~85k values). Is there a way to improve it ? By using ranges for example ? Here is the code:

def configure_figure(df):
    try:
        fig = go.Figure(
            layout=go.Layout(height=700)
        )
        fig.add_trace(
            go.Scattergl(  
                name="scatter",
                x=df.index,
                y=df['values'],
                mode="lines+markers",
                line=dict(color='black', width=1),
                marker=dict(color=df['color'], size=6),
                selected=SELECTED_MARKER
            )
        )

The second question is that I need to refresh the figure when the user as labelled the plot, to improve performance I wanted to do a clientside_callback but there already is a “standard” callback modifying the figure. How can I have the figure output of the clientside_callback be the same as that “standard” callback ?

Third question is about the range slider: is there a way to show the mini plot on the range slider when using scattergl ? Here is mine for the moment:

Thanks for the reading :).