[openstreetmap/openstreetmap-website] Reduce size of application.js by removing translations? (#1949)

Andy Allan notifications at github.com
Thu Aug 16 12:14:41 UTC 2018

> The key thing is not removing the translations from application.js

I disagree. I tried to take the discussion one step further - rather than just "we need to send the translations more efficiently" I tried to examine whether we need to send these translations at all. I'd like to see a compelling reason for doing all this client-side instead of server-side.

> Your other suggestion appears to be going in the opposite direction of what I understood to be our direction of travel, by moving things from the client to the server.

I don't know whether there's a direction of travel or not, and I don't have a strong opinion on that. But in my investigations so far it appears that buildling small html pages client-side has moderately large downsides. Again it might not be so noticeable on fast connections in Europe, but when a simple browse page takes multiple EU <-> HK roundtrips it becomes noticeable to me - even on a high bandwidth connection. I expect it will be much worse on low-bandwidth, high-latency connections elsewhere.

> I'm really reluctant to be tying up server resources on something like that which can be relatively long running

I don't think putting together the browse or query pages server-side will actually be that expensive, but that's definitely a risk. From what I've seen so far, making one request and getting the compact html in response is going to be much better than multiple xhr back-and-forwards and large json payload responses.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180816/af7f89e6/attachment.html>

More information about the rails-dev mailing list