Skip to content

Culling does not appear to apply to PolyWidgets #5

Description

@V3ntus

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)),
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions