Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional inconsistency: validation cannot be disabled for API methods queryRenderedFeatures, querySourceFeatures, addSource, addLayer #8189

Closed
gorshkov-leonid opened this issue Apr 25, 2019 · 3 comments
Labels
api 📝 feature 🍏 performance ⚡ Speed, stability, CPU usage, memory usage, or power usage

Comments

@gorshkov-leonid
Copy link
Contributor

gorshkov-leonid commented Apr 25, 2019

API provides way to disable expressions validation for some cases. As I undastand it has been done for performace in production, it is our case too. Next methods provide ability to disable validation:

  • Map.setFilter
  • Map.setLayoutProperty
  • Map.setPaintProperty
  • Map.setFilter
  • Map.setLight

But validation also is used in following methods, and cannot be disabled:

  • queryRenderedFeatures, querySourceFeatures
  • addSource, addLayer (are not so critical)

mapbox-gl-js version: 0.54 beta 2
browser: any

@mourner mourner added api 📝 feature 🍏 performance ⚡ Speed, stability, CPU usage, memory usage, or power usage labels Apr 25, 2019
@gorshkov-leonid gorshkov-leonid changed the title Functional incontinence: validation cannot be disabled for API methods queryRenderedFeatures, querySourceFeatures, addSource, addLayer Functional inconsistency: validation cannot be disabled for API methods queryRenderedFeatures, querySourceFeatures, addSource, addLayer Apr 29, 2019
@gorshkov-leonid
Copy link
Contributor Author

Sorry for typo

mourner pushed a commit that referenced this issue May 1, 2019
…querySourceFeatures (#8211)

* #8189 disable validation for queryRenderedFeatures and querySourceFeatures

* #8189 disable validation for queryRenderedFeatures and querySourceFeatures

* #8189 disable validation for queryRenderedFeatures and querySourceFeatures. Unit tests, fix flow compilation.
@mourner
Copy link
Member

mourner commented May 1, 2019

This shipped for queryRenderedFeatures, querySourceFeatures. I think we can close this because addSource and addLayer aren't per-frame operations, so don't really need this optimization.

@mourner mourner closed this as completed May 1, 2019
@gorshkov-leonid
Copy link
Contributor Author

Yes, I agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api 📝 feature 🍏 performance ⚡ Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

2 participants