Re:Skypack – A new kind of JavaScript delivery network
by vimslayer on Tuesday July 14, 2020 @05:47AM
(#23830081)
There are lots of libraries that don't really support dead code removal via stuff like tree saking anyway. React, moment.js, Bluebird, etc
Re:Skypack – A new kind of JavaScript delivery network
by bhl on Tuesday July 14, 2020 @12:15AM
(#23828465)
I wouldn't be surprised if Skypack eventually supported the ability to remove unused code: that's a core concept in Snowpack, an unbundled development tool, also built by Pika CDN.
Re:Skypack – A new kind of JavaScript delivery network
by blaisio on Monday July 13, 2020 @06:19PM
(#23826215)
You lose the ability to remove unused code, but for people using this, it doesn't matter, because it is cached anyway.
The number of HTTP requests really does not matter much these days, because of HTTP2. And again for people who use this service and get a speedup from it, it doesn't matter because it is cached.
Re:Skypack – A new kind of JavaScript delivery network
by Quekid5 on Monday July 13, 2020 @06:27PM
(#23826299)
> You lose the ability to remove unused code, but for people using this, it doesn't matter, because it is cached anyway.
I was under the impression that parsing (etc.) time matters as well, not just raw download time/latency?
Re:Skypack – A new kind of JavaScript delivery network
by blaisio on Monday July 13, 2020 @06:48PM
(#23826503)
Yes that's fair, with less code you have less to parse. Parsing time is ideally a negligible amount of time, especially because it can normally happen asynchronously, but for very large libraries I could see it being an issue.
Re:Skypack – A new kind of JavaScript delivery network
by rimliu on Tuesday July 14, 2020 @08:41AM
(#23831155)
"ideally"
Re:Skypack – A new kind of JavaScript delivery network
by no_wizard on Monday July 13, 2020 @10:45PM
(#23827955)
Well yes and no, this will depend on how you build and serve the dependency graph. If they did their diligence with the production build you should be able to
Optimize re-usability of common imports as well as optimizing modules to only import the bare minimum of what’s needed. Now granted as far as I can tell from a technical perspective in absolute terms you will always get the best builds tuning your builds locally, however it’s not all or nothing either
Re:Skypack – A new kind of JavaScript delivery network
by JMTQp8lwXL on Monday July 13, 2020 @07:23PM
(#23826815)
You assume I can use HTTP/2. I've pleaded with my upstream service owners to no avail. Since they control network traffic, I have no choice.
Re:Skypack – A new kind of JavaScript delivery network
by manigandham on Monday July 13, 2020 @07:42PM
(#23826949)
What do you mean by upstream service owners? All you need for HTTP2 is for your browser to support it as you download from the CDN domain.
Re:Skypack – A new kind of JavaScript delivery network
by JMTQp8lwXL on Monday July 13, 2020 @10:56PM
(#23827997)
In my organization, someone else controls the traffic that arrive to servers that host things like CDN assets. And it's all HTTP 1.1.
So in the end, their hosted copy might be much larger than if you had hosted an optimized copy yourself.
Using their service, it is also impossible for you to merge small dependencies and your application logic into one file to reduce the number of HTTP requests. The resulting higher number of gets might well make it slower than not using their CDN in the first place.