tangrams / bubble-wrap

Bubble Wrap basemap style
http://tangrams.github.io/bubble-wrap/
MIT License
27 stars 21 forks source link

Performance hit on HTML rig setting labels options #235

Open nvkelso opened 7 years ago

nvkelso commented 7 years ago

Picking up the conversation in https://github.com/tangrams/bubble-wrap/commit/1e07f8eb16d3365a27dba8dcb12a62420d6ef054#commitcomment-20493215...

@bcamper said:

I think before we cut a release of this update, we are going to need to find a way to 
drive much more of this in the scene file. Especially with conditionals, it's moving too 
much styling logic into an external file, which will make it unwieldy to support in cases 
like Mapzen.js, and even more so native SDKs. I also observed noticeable performance 
impact from re-running these global substitutions on start-up (they already get applied 
in the scene file, so immediately re-applying them introduces extra overhead).
nvkelso commented 7 years ago

The release proposal on the table is each YAML file per basemap style label variant would have the globals set in the YAML file, as has been done previously using the older YAML anchors and for TRON using the newer global syntax.

It sounds like the HTML rig introduces noticeable performance impact and we should look at that, but I don't think that affects straight Tangram use of the scene styles, or Mapzen.js use of the scene files. @bcamper can you provide further detail on the performance hit and how to replicate it, please?

I agree longer term we should move towards a more generic system than these dozens of globals, but right now these are internal variables that have been around for a while. Tracking general conditionals (globals) for label with https://github.com/tangrams/bubble-wrap/issues/236.