mapbox / mapbox/mapbox-gl-js

look into using fetch priority

Open
#11,660 0 comments 3 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

priority (high | low | auto) can now be set for fetch requests in Chrome 101. We should look into whether we improve load times by using this to prioritize resources. We already try to prioritize requests by making them in order of priority, so it isn't clear if this will be very useful at this point.

Completed Origin Trials
The following feature, previously in a Chrome origin trial, is now enabled by default.

Priority Hints
Priority Hints provides a way to indicate a resource's relative importance to the browser, allowing more control over the order resources are loaded.

https://blog.chromium.org/2022/03/chrome-101-federated-credential.html

A USVString indicating the hinted priority of the request. > Possible values are:

high: Fetch the request at a high priority relative to other requests of a similar type.
low: Fetch the request at a low priority relative to other requests of a similar type.
auto: Default mode, which indicates no preference for the fetch priority. The browser decides what is best for the user.

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

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 reviewing the existing request-order prioritization described in the issue and the Fetch API's Request.priority values. Measure whether applying high, low, or auto changes load times for relevant resources; done requires documented evidence and a clear decision on whether implementation is warranted.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.