4 ms·
If every requests adds this fixed latency, it would be much better to try and parallelize the requests vs bundling everything.
by treve 7y ago
If every requests adds this fixed latency, it would be much better to try and parallelize the requests vs bundling everything.
- picardo 7y agoTrue, but these requests cannot be made simultaneously. The code is loaded only when the UI needs it.
- treve 7y agoIf the files can be combined, the requests can be made simultaneously
- ehnto 7y agoYou're right, and HTTP/2 was supposed to be a major boon here, but the problem is actually that the UI itself only loads these things once they've been rendered by the framework which is often after another component has loaded them, and even if they can be ran in parallel the response times can still vary, causing the UI jiggle you often see. This isn't really a problem unique to high latency either, if you have a patchy connection in transit or for some other reason, the UI will suffer.
- badfrog 7y ago> but the problem is actually that the UI itself only loads these things once they've been rendered by the framework which is often after another component has loaded them That just sounds like bad front end coding. A good framework used properly would not have that issue.
- honopu 7y agoIn webpack you can define which components are in which chunk, so you could organize them that way. I don't, but I know it exists.