CrabDude / trycatch

An asynchronous domain-based exception handler with long stack traces for node.js
MIT License
246 stars 17 forks source link

Speed up long stack traces #51

Open ChrisCinelli opened 6 years ago

ChrisCinelli commented 6 years ago

I am still using this puppy... and I am still an happy customer.

I was looking at the implementation of the long stack traces. It looks like that you do string concatenations for each async stack.

I was wondering... Would not be better to just store a reference to the string and lazy concatenate the strings only when somebody access to the err.stack ? I think you can save a lot of CPU and memory this way.