mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Prioritize performance in vtile decoding #194

Closed springmeyer closed 8 years ago

springmeyer commented 8 years ago

This moves the previously hardcoded v1->v2 upgrade and full tile recursion for vtile schema validation to opt-in (disabled by default).

This will unlock being able to render both existing v1 and future v2 tiles to images with AGG without an extra performance cost compared to node-mapnik v3.4.x (for this code path the spec version and v2 polygon validity don't matter).

/cc @yhahn @jakepruitt @flippmoke @mapsam @GretaCB

Before merging:

pnorman commented 8 years ago

Looking forward to when v3 comes out, is this the best API?

If we have the same scenario where the vector tiles can be upgraded, there's no way to know if the calling application wants a v1->v2 upgrade or wants everything upgraded to v3.

springmeyer commented 8 years ago

Looking forward to when v3 comes out, is this the best API?

@pnorman - I've had the same thought during this code review: that this API is currently not a robust one for allowing fine grained control over upgrades going forward. But that is not something I'm working on currently, so I've attempted to make the minimal changes necessary in the pull to get the upgrade and validation behavior exposed as options.