Using Pandas or NumPy datetime objects can be significantly slower than Unix epoch timestamps because Plotly's scatter(gl) constructor performs slower serialization for non-numeric (object) arrays.
To avoid this performance bottleneck, do not pass datetime data directly into the go.Scatter constructor. Instead, pass the high-frequency data using the hf_x and hf_y arguments in the FigureResampler.add_trace (or FigureWidgetResampler.add_trace) method. This allows plotly-resampler to handle the aggregation and only pass the necessary aggregated data to the Plotly object.
import plotly.graph_objects as go
import pandas as pd
import numpy as np
from plotly_resampler import FigureResampler
# Create the dummy dataframe
y = np.arange(1_000_000)
x = pd.date_range(start="2020-01-01", periods=len(y), freq="1s")
# Create the plotly-resampler figure
fig = FigureResampler()
# fig.add_trace(go.Scatter(x=x, y=y)) # This is slow
fig.add_trace(go.Scatter(), hf_x=x, hf_y=y) # This is fast