mapbox / mapbox-upload-validate

Validate that files can be uploaded to mapbox.com
ISC License
5 stars 7 forks source link

Optimize validation steps #69

Closed springmeyer closed 5 years ago

springmeyer commented 7 years ago

As I was reviewing #68 I noticed that, overall:

For :omnivore types in particular the problem exists that:

If any one of these functions is expensive (they are for big files) then the cost compounds.

This PR starts refactoring the code so that validation does not try to be generic for all filetypes. Rather we call into the filetype specific validator and inside each we can optimize the order and necessary calls. In particular this fixes the case that breaks in #68 so that the existing KML layer count validation is able to run before tilelive.info which would never finish because it is so expensive.

/cc @mapsam @who8mycakes

GretaCB commented 7 years ago

Referencing convo about implementation over at https://github.com/mapbox/mapbox-upload-validate/issues/71#issuecomment-268045490

springmeyer commented 5 years ago

won't get around to working on this again