De-duplicate array enums for symbol layer properties when parsing the style
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Moved from https://github.com/mapbox/mapbox-gl-js/pull/8399#discussion_r299234134
`text-variable-anchor` values are not currently de-duped.
In #8399, `text-writing-mode` values are de-duped for every bucket.
The array of values for `text-variable-anchor` and `text-writing-mode` should be de-duplicated as part of parsing the style. This would do it just once, allow better style diffing, and reduce per-bucket work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the style-parsing entry point that handles the text-variable-anchor and text-writing-mode properties, then compare where each array is currently de-duplicated. The work is done when both arrays are de-duplicated during style parsing rather than per bucket, with style diffing and bucket processing reflecting the parsed values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100