mapbox / mapbox/mapbox-gl-js

Consider using OffscreenCanvas wherever possible

Open
#8,104 4 comments 15 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

OffscreenCanvas is now available in Chrome, Firefox and Opera. Very soon it will be available in Edge also, since they are switching over to chromium this year.

https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas

Taking advantage of the above feature and moving the rendering pipeline into a webworker would ensure a consistently smooth 60FPS at all times, due to rendering being decoupled from the the user's input, and the main thread being kept free at all times.

This is something that should definitely be considered going forward as the user experience and performance advantages would be phenomenal.

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

No files, tests, or entry points are identified in the issue. Start by locating the existing rendering pipeline and its relationship to the main thread, then review the OffscreenCanvas documentation and browser support noted in the report. Done would require an agreed design, implementation scope, and evidence that rendering is decoupled while maintaining the expected map behavior and performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance, web-dev
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.