FeatureLevelRemove- and SourceLevelRemove-Benchmarks in remove_paint_state.js are exactly the same
Nobody has claimed this yet.
- 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
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 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