Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Culling does not appear to apply to PolyWidgets #5

Open
V3ntus opened this issue Feb 20, 2024 · 0 comments
Open

Culling does not appear to apply to PolyWidgets #5

V3ntus opened this issue Feb 20, 2024 · 0 comments

Comments

@V3ntus
Copy link

V3ntus commented Feb 20, 2024

Platform: Linux (deploying production releases on Windows 10/111 devices)
Device: Dell Precision 7560 - Nvidia T1200 - Intel i7-11800H

Marker count is 973 with a majority of it being polywidget raster images and the rest being flutter icons or text.
Polyline count is 1886 (many simple polylines with on average at most 2 points each),
Tile layer is using rasterized MapBox.

With almost 1000 markers/PolyWidgets, there is a significant performance hit (averaging 20FPS) without a self-implemented culling solution:
image

With a culling solution applied, performance is improved significantly:
image

The pseudocode culling solution is shown below. Essentially it only passes through widgets to render that are present within flutter_map camera bounds.

PolyWidgetLayer(
	polyWidgets: elements.where((e) => e.center.latLng.isInsideBoundsOf(MapCamera.of(context).visibleBounds)),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant