I’m actually quite stunned as, even before any optimisation whatsoever, I found that I could build and rebuild the entire Sun-path mesh on every change in pretty well real time. This started out as an experiment to see just how responsive I could make the generation and display of 3D Sun-path diagrams and shadow projections using JavaScript and WebGL. You can set the location using the map by either dragging the locator icon around or clicking in the position you want. You can also use both the popover buttons and information panels located in the top-right to set the date, time and location. It should be fast enough to update in pretty close to real-time as you drag the locator within the map or the date/time in the day-length chart. The aim was to clearly illustrate the relationship between geographic location and the annual Sun-path.
The SVG chart defaults to showing the annual variation in day-length, but you can also select an analemma chart or several different types of 2D Sun-path diagram. This app connects an interactive Google World Map to a 3D Sun-path diagram, shadow map generator and a 2D SVG chart displaying a range of solar information.