spatialdata-plot icon indicating copy to clipboard operation
spatialdata-plot copied to clipboard

Coloring by AnnData in `render_labels` is insanely slow

Open timtreis opened this issue 6 months ago • 1 comments

When I call

fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(4, 4))

(
    sdata_sample2
        .pl.render_labels(
            "filtered_hexes",
            # color="B_cells",
            table_name="morphology_filtered",
        )
        .pl.show(ax=ax)
)

the plot takes about 15 s,

when I call

fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(4, 4))

(
    sdata_sample2
        .pl.render_labels(
            "filtered_hexes",
            color="B_cells",
            table_name="morphology_filtered",
        )
        .pl.show(ax=ax)
)

it's 2.5 min

Image

timtreis avatar May 25 '25 15:05 timtreis

There's no reason why this should be so slow

timtreis avatar May 25 '25 15:05 timtreis