3 ms·
> websites that have noticeably slow javascript "startup" times. Doesn't that just mean it can take a long time for the browser-application to download all of
by galaxyLogic 5y ago
> websites that have noticeably slow javascript "startup" times.
Doesn't that just mean it can take a long time for the browser-application to download all of its scripts?
That can certainly take a long time but it depends on
1) The speed of the web-server(s) serving those scripts
2) The speed of the network you are connected to
So web-sites taking a long time to execute their JavaScript on your PC in the browser does not say much about the speed of JavaScript the language.
But it is a practical concern of course. Which brings to my mind the fact that JavaScript programs can exhibit extreme parallelism, because they can execute in millions of browsers at the same time, think SETI-search, or unauthorized crypto-mining.
So in practice JavaScript can have a huge computational throughput, in other words great speed, because it can execute on multiple clients at the same time, easily.
- pjscott 5y agoJS startup time also includes parsing the code and (initially) running in a very low-optimization mode, usually a bytecode interpreter, while the VM gathers profiling data in preparation for later JIT compilation of hot spots. This can be a serious hit to page load times even when all scripts are cached.