#15466·bokeh

Performance regression after latest WebGL updates

Author: muendleinCreated Sep 25, 2026Updated Sep 26, 2026
LabelsTRIAGE

Software versions

4.0dev5

Browser name and version

No response

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

WebGL performance should be smooth for a scatter plots with many points.

Observed behavior

Paint call just got 6x slower, now dominating the runtime.

Example code

python
import numpy as np

from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure

n_splits = 100
n_split_samples = 20_000

cds_standard = ColumnDataSource(data={"x":[], "y":[]})
cds_multi = ColumnDataSource(data={"x":[], "y":[]})
cds_scatter = ColumnDataSource(data={"x":[], "x2": [], "y":[]})

for i in range(n_splits):
    x_data = np.arange(n_split_samples)
    y_data = np.sin(x_data/100) + x_data/500*np.random.randn()

    cds_standard.stream({"x": x_data, "y": y_data})
    cds_multi.stream({"x": [np.append(x_data, x_data[0])], "y": [np.append(y_data, y_data[0])]})
    cds_scatter.stream({"x": x_data, "x2": -x_data, "y": y_data})


p1 = figure(title="Single line", output_backend="webgl")
p2 = figure(title="Multi line", output_backend="webgl")
p3 = figure(title="Scatter", output_backend="webgl")

p1.line(x="x", y="y", source=cds_standard)
p2.multi_line(xs="x", ys="y", source=cds_multi)
p3.scatter(x="x", y="y", source=cds_scatter, size=1)

curdoc().add_root(row(p1, p2, p3))

Stack traceback or browser console output

No response

Screenshots

Before:

Image

After:

Image