d3.js realtime streamgraph memory usage
I am happy your problem is solved. All in all, your code looks solid, my review is mostly nitpicking:


I am all for spartan coding, but you have far too many 1 and 2 character variables, you ought to use more meaningful variables.
Try to have 1 var block at the top. More specifically, you declare data0 after declaring the function stream_layers, there is no need for that.
Please use lowerCamelCase coding, so update_layers -> updateLayers
There is no need to call .mouseover(); after setting the listener, especially since you also call .mouseout(); afterwards for which there is also no need as you already set x and y to 1 with var currentMouseCoord = { x: 1, y: 1 };
You can drop curly braces after loops, please don't drop newlines.
vis.selectAll("path").data(data0).attr.... in transition() really should be broken out into multiple lines.