mapbox / mapbox/mapbox-gl-draw

Proposal: disable hot/cold switch when rendering only a few features

Open
#916 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance rendering
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

Currently, this causes significant flicker even in cases where it's avoidable.

In our case, we render only 1 feature that's being drawn/edited within draw. The feature seems to disappear/flicker for a second when finishing a vertex move.

This flicker is visible even in this example: https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/ - obviously on a larger map with more things on other layers the issue is even worse.

Issue seems to come comes from it moving between cold and hot layers. In case of a single feature being edited though, would it make sense to have everything in the hot layer for example?

Related tickets:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the flicker in the linked Mapbox GL Draw example with a single edited feature, then trace how features move between hot and cold layers. Read related issues 332, 871, and 329 for existing context. Done means the single-feature editing case no longer flickers without regressing rendering for larger maps.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.