There are cases when it is necessary to update the Error object in order to obtain a stack trace, for example, for logging engines or built-in debugging.
In modern node.js, there is a severe performance hit when an Error object is first created or smart V8 developers decided to spin the stack on demand only when the developer calls the <Error> .stack property.
From my learning of tools, I think that stack trace unwinding is not performed until <Error> .stack is accessed, and this seems like a common sense approach.
Can anyone shed some light on this or suggest ways to test for short debugging of your own V8 code?
source
share