kripken/emscripten — pull request #1990 by inolen (2014-01-08 20:00:27+00:00)
Title: utilize stack member from base Error class

Oh FS.ErrnoError... I was profiling quakejs today and noticed stackTrace() was taking up a huge amount of my frame due to a net call returning EAGAIN each frame:

http://i.imgur.com/4eyly10.jpg

While looking at it, I wondered why we weren't using the stack provided for us by the Error object. I changed up FS.ErrnorError to do so and this was the result:

http://i.imgur.com/5zfCsnu.jpg

Adding the EAGAIN error to the genericErrors list didn't show a noticeable improvement. I'm assuming the JS engines are somehow optimizing generating this stack property in certain situations?