mapbox/mapbox-gl-js

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

开放

#10,049 创建于 2020年10月23日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (2,203 个派生)batch import
good first issue

仓库指标

星标
 (10,532 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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?

// No loop
this.map.removeFeatureState({source: 'land'}); 

Maybe also source-property level like this?

// No loop
this.map.removeFeatureState({source: 'land'}, 'bench');

贡献者指南