mapbox / mapbox/mapbox-gl-js

FeatureLevelRemove- and SourceLevelRemove-Benchmarks in remove_paint_state.js are exactly the same

Open
#10,049 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Unless I'm missing something, both benchmarks were already the same when they were added in #7761 by @peterqliu :

https://github.com/mapbox/mapbox-gl-js/blob/ff8e087b6e7cc9fe63eb4809a0895b38029a67e2/bench/benchmarks/remove_paint_state.js#L88-L100
https://github.com/mapbox/mapbox-gl-js/blob/ff8e087b6e7cc9fe63eb4809a0895b38029a67e2/bench/benchmarks/remove_paint_state.js#L102-L114

I haven't used these APIs yet, but I believe the SourceLevelRemove should have used something like this?
```js
// No loop
this.map.removeFeatureState({source: 'land'});
```

Maybe also source-property level like this?
```js
// No loop
this.map.removeFeatureState({source: 'land'}, 'bench');
```

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 in bench/benchmarks/remove_paint_state.js at the FeatureLevelRemove and SourceLevelRemove benchmark blocks linked in the issue. Compare their setup and calls with the removeFeatureState API, then run the relevant benchmark to confirm the two cases exercise different scopes. Done means the feature-level and source-level benchmarks are no longer identical and each measures its named operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.