Skip to content

Bad performance with many overlapping symbols #6192

@rubengees

Description

@rubengees

maplibre-gl-js version: 5.6.1

browser: Any (tested on Firefox and Chromium)

Steps to Trigger Behavior

  1. Add a layer with icon-allow-overlap and add many features to it.
  2. Zoom out so they overlap.

Link to Demonstration

https://jsbin.com/cixafubugo/edit?html,output

Expected Behavior

Zooming is lag-free.

Actual Behavior

Zooming when many features overlap has heavy lag. The further zoomed out the worse it is. Moving the map or rotating it works good.

Here is a screenshot from the Firefox profiler:

Image

Almost all time is spent in findMatches. Is optimization possible there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions