developmentseed / developmentseed/lonboard

Noticable performance drop in 0.13.0?

Open
#1,049 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
964
Forks
54
Avg merge
5m
Merged PRs (30d)
1

Description

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:
```python
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:
```python
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:
```python
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:
```python
map_ = Map(
[path_layer],
height=600,
)
map_.controls = [] # It's not the new controls
map_
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.