You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did search for issues, but I'm not sure if this is possible already or not.
Looking at the Network tab in Development Tools in the production/development build of a SolidStart, it seems that the calls to the server are fetch calls (to the /_server).
I think there would be performance gains to be had here if this was done with websockets. I.e. open the connection when the first request is made and use that with every page change. When the page changes are client-side, it should be possible to use websockets.
Motivation 🔦
Connection always open
HTTP request overhead will not exist
The text was updated successfully, but these errors were encountered:
It is the contrary actually, and not all web services has built-in websockets support. There isn't really any benefit on switching towards it, in fact, fetch provides more pros than cons.
open the connection when the first request is made and use that with every page change
Running 100 requests for each method, 2 times...
Run 1:
HTTP Fetch with Keep-Alive:
Average: 18.980 ms
Min: 17.000 ms
Max: 35.000 ms
HTTP Fetch without Keep-Alive:
Average: 33.530 ms
Min: 19.000 ms
Max: 38.000 ms
WebSocket:
Average: 14.640 ms
Min: 14.000 ms
Max: 16.000 ms
Run 2:
HTTP Fetch with Keep-Alive:
Average: 19.030 ms
Min: 17.000 ms
Max: 38.000 ms
HTTP Fetch without Keep-Alive:
Average: 33.160 ms
Min: 19.000 ms
Max: 38.000 ms
WebSocket:
Average: 14.700 ms
Min: 13.000 ms
Max: 17.000 ms
Average Results Across All Runs:
keepAlive:
Average: 19.005 ms
Min: 17.000 ms
Max: 38.000 ms
noKeepAlive:
Average: 33.345 ms
Min: 19.000 ms
Max: 38.000 ms
webSocket:
Average: 14.670 ms
Min: 13.000 ms
Max: 17.000 ms
It's not a huge difference between keep-alive fetch and websocket. Not totally without a difference.
Duplicates
Latest version
Summary 💡
I did search for issues, but I'm not sure if this is possible already or not.
Looking at the Network tab in Development Tools in the production/development build of a SolidStart, it seems that the calls to the server are fetch calls (to the
/_server
).I think there would be performance gains to be had here if this was done with websockets. I.e. open the connection when the first request is made and use that with every page change. When the page changes are client-side, it should be possible to use websockets.
Motivation 🔦
The text was updated successfully, but these errors were encountered: