It would take either a domain expert or someone willing to spend a few months studying the problem to write an optimized version, but then it could probably be made to run a couple orders of magnitude faster by using slightly coarser approximations for various function evaluations (no need for 10^-15 precision for drawing on screen), or by simplifying the problem to require fewer function evaluations overall (e.g. by using Bézier curve segments instead of straight line segments), rewriting the core of the library to be vectorized, and rendering via a raster- rather than DOM-based drawing system. I’m sure a GPU could handle such a problem very effectively, though working with WebGL might be a pain.
Anyway, go for it!
Why?
The expensive part is rendering them in an arbitrary map projection.
Considering this is an orthographic projection, and therefore spherical polygon edges are all ellipses, rendering this picture could certainly be special-cased to only draw ellipses and thereby run much faster. But it’s using a very general D3-geo framework. If you want you can easily tweak the code and the map will be drawn on whatever projection you like.
To see some of the possibilities, go to http://bl.ocks.org/mbostock and scroll down a bit.
It's amazing how fast computers are. And it's amazing how slow we make them with layers and layers of cruft built atop more layers and layers of cruft.
Imagine if the author had instead used, say, DirectX and C++ and only bothered compiling it for his own platform. Not only would it be nearly impossible for this to have reached the same audience so quickly, but it likely would have taken the author longer to make as well because JavaScript + D3.js are uniquely suited towards rapidly making these sorts of prototypes.
We live in a time where a complicated, interesting visualization like this can be built in a day or two, and appear as #3 on hacker news. Less than 10 years ago it probably would have taken 10x the time, maybe more, and your iPad Air didn't exist.
It's not like it's doing global illumination pathtracing or anything.
For what it's worth, it's also fun that key elements of the text are dynamic. When I first landed on the page with noscript suppressing any script, I saw:
> Most Remote Airport
> … at … is the most remote; from the nearest airport, .
Usually if I see any text, I don't bother enabling script, so this confused me. Luckily I did enable the script and then saw the principle UI element on the page. :)
But the end result is just toooooooooo much for any reasons.