Skip to content

Noticable performance drop in 0.13.0?Β #1049

@shawnboltz

Description

@shawnboltz

Hello, I was just playing around with 0.13.0 hoping to make use of its new map controls. I noticed that it seems to have taken a pretty significant performance hit for me compared to 0.12.1 and I was wondering if you had any idea what the cause may be?

OS: Windows 11
Python: 3.12.12

I have defined the following layers:

import geopandas as gpd
from lonboard import Map, PathLayer, ScatterplotLayer
from shapely.geometry import LineString, Point

# Create a ScatterplotLayer
point1 = Point(-123.9, 40)
point2 = Point(-75.9, 40)

gdf_point = gpd.GeoDataFrame({"name": ["point1", "point2"], "geometry": [point1, point2]})
scatter_layer = ScatterplotLayer.from_geopandas(
    gdf_point,
    radius_min_pixels=3,
)

# Create a PathLayer
line1 = LineString([(-123.9, 40, 0), (-75.9, 40, 0)])
line2 = LineString([(-123.9, 39, 0), (-75.9, 39, 0)])

gdf_line = gpd.GeoDataFrame({"name": ["line1", "line2"], "geometry": [line1, line2]})
path_layer = PathLayer.from_geopandas(
    gdf_line,
    width_min_pixels=3,
)

When I create a map without any layers, it seems as responsive as normal:

map_ = Map(
    [],
    height=600,
)
map_.controls = []  # It's not the new controls
map_

When I add a ScatterplotLayer, it's still ok but definitely seems slower when panning:

map_ = Map(
    [scatter_layer],
    height=600,
)
map_.controls = []  # It's not the new controls
map_

When I add a PathLayer, both zooming and panning are considerably slower:

map_ = Map(
    [path_layer],
    height=600,
)
map_.controls = []  # It's not the new controls
map_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions