3 ms·
LiveView should already have less latency than an app doing traditional AJAX requests, since an open web socket is a lot better than making a call to axios! Th
by AlchemistCamp 6y ago
LiveView should already have less latency than an app doing traditional AJAX requests, since an open web socket is a lot better than making a call to axios!
The less latency the better, though, of course. I'm seeing roughly 80ms, which is very good.
- watermelon0 6y agoHTTP with keep-alive supports keeping around idle connections, which can be used to make subsequent AJAX calls. HTTP/2 has this by default, and allows multiplexing multiple requests on a single connection, so even making multiple parallel calls won't require establishing new connections. Basically, performance between AJAX and web sockets should be comparable in most cases.