mapbox / mapbox/mapbox-gl-js

Optimizations for batch image manipulation

Open
#10,940 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance :zap:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation

In Studio we commonly will call `addImage` multiple times in a loop. This could be optimized for performance.

## Design Alternatives

`addImage` could defer sending to the web worker until the next frame, which is similar to how GL JS already handles layer changes. https://github.com/mapbox/mapbox-gl-js/blob/36533f3683dd48837ab07095fb6484165d9ee400/src/style/style.js#L454

## Design

The mostly happens behind the scenes. It seems the main drawback is having to wait an additional frame before the web worker is notified.

### Concepts

### Implementation

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 locating the addImage entry point and reading the referenced Mapbox GL JS style.js implementation for deferred layer changes. Determine the relevant performance benchmarks and tests, then define how batching should be verified and what behavior is expected before implementation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.