[openstreetmap/openstreetmap-website] Reduce size of application.js by removing translations? (#1949)
notifications at github.com
Fri Aug 17 01:06:18 UTC 2018
> Well surely the point is that we're not really building them client side - we are fetching them from the server and then augmenting.
Maybe I phrased it badly. By multiple round trips I mean:
* Client requests query page (trip 1)
* Client receives placeholder html (trip 2)
* Client makes js requests to overpass (trip 3)
* Client receives json responses from overpass (trip 4)
I think we're very much building these responses client-side.. I'd prefer to see the server making the requests to overpass, to cut down on the number of round trips (and incidentally, this would cut out unnecessary https sessions to different servers too).
(Even the browse pages involve multiple trips, since we do make the html part server-side, but then make the client make a entirely separate request for the node XML just to get the coordinates in order to put it on the map)
> My concern is not CPU or anything but rather tying up a rails server for N seconds while it waits for an API response.
Yep, that's what I was thinking of too. OSMF would prefer to be doing this in a multithreaded setup rather than having processes blocked on external responses. Puma (default rails server) runs multithreaded by default, but passenger (what OSMF uses) only supports multithreading in Passenger Enterprise. But that is a decision that can be made later, if we decide that this idea has merit in the first place and if (big if) necessary.
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...
More information about the rails-dev