Re:Cash: An absurdly small jQuery alternative for modern bro...
by theandrewbailey on Sunday November 03, 2024 @07:51AM
(#42032766)
A network request isn't free, only less costly than it used to be. Even with HTTP 3, your JS execution is stalled for however long the RTT is back to the server. That could be 500+ ms if its on the side of the world and doesn't have a CDN.
[ Parent
| on HN ]
Re:Cash: An absurdly small jQuery alternative for modern bro...
by mg on Sunday November 03, 2024 @10:08AM
(#42033463)
Depends on the import tree. The way I understand it, this:
import { x } from '/a.js';
import { y } from '/b.js';
Does not take longer than this: import { x } from '/a.js';
Because the message to the server "Give me b.js" goes out in the same network packet as "Give me a.js" and the data of b.js comes back in the same packet(s) as the data of a.js.