4 ms·
This is why I don't like require.js, one script requires this script which requires that script. If there is one hiccup somewhere down the line it causes the wh
by FriedrichN 5y ago
This is why I don't like require.js, one script requires this script which requires that script. If there is one hiccup somewhere down the line it causes the whole page to have to wait. One of my clients had their website made and wondered why it was so slow (the designers said it needed a faster server) but I found out it was requesting hundreds of .js files in roughly 10 waves. Causing the whole page to take up to 10 seconds to load completely.
- wging 5y agoWith requirejs, that work can and should be done at build time. There shouldn't be a dependency waterfall. https://requirejs.org/docs/optimization.html https://requirejs.org/docs/optimization.html
- FriedrichN 5y agoExcept nobody does that. They don't know how to. For the record, I bundle all my JS/CSS assets in one file.
- earthboundkid 5y agoIt sounds like you and your clients need to learn more about modern JS bundling techniques. Making a waterfall of requests can be okay in development but should never ship to production.