[openstreetmap/openstreetmap-website] Disable `validateStyle` in production for minor initalisation performance gains on slower hardware (PR #6754)
Andy Allan
notifications at github.com
Thu Jan 29 15:03:28 UTC 2026
gravitystorm left a comment (openstreetmap/openstreetmap-website#6754)
I don't think it's a good idea to base this on the environment.
We use the `style.json` files directly from the upstream projects (e.g. [here](https://github.com/openstreetmap/openstreetmap-website/blob/cfae67036dcbeb66e5358d5cf670df915220d885/app/assets/javascripts/leaflet.maptiler.js#L8)). So they can be valid or invalid at any moment. There's nothing in our application that locks the stylesheet to a specific version, and there's nothing in our application that e.g. ensures it is valid during the tests and then that guarantees it will remain valid during production.
So the question is how should we handle the stylesheets if, at any moment, they become invalid. I don't think it's worth having different behaviour in production and development in this case. Either the app handles the invalid stylesheet cleanly, or it doesn't.
As for turning off the validation for performance reasons - I can be persuaded, but we need to describe exactly what happens in production if the upstream project deploys an invalid stylesheet. Just a blank map? Or does the whole map javascript fail?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6754#issuecomment-3818265223
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6754/c3818265223 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260129/e721b4f9/attachment.htm>
More information about the rails-dev
mailing list