Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack trace generation in Err() can be very costly #77

Open
flupke opened this issue Aug 31, 2023 · 2 comments
Open

Stack trace generation in Err() can be very costly #77

flupke opened this issue Aug 31, 2023 · 2 comments

Comments

@flupke
Copy link

flupke commented Aug 31, 2023

In an async heavy test (fuzzy testing with a lot of requests and network issues simulated with toxiproxy), rewriting a bit of the code with ts-results-es made the test fail.

I tracked the issue down to the stack trace generation in Err(), which was taking ~300ms parsing the source maps. I removed it entirely in this fork, which solved the issue.

I'm not sure how or if this should be fixed here, just wanted to report the issue.

@jstasiak
Copy link
Collaborator

jstasiak commented Oct 5, 2023

Thank you for the report @flupke.

I'm wondering what needs to happen for stacktrace generation to take that long, I don't think it's normal.

In parallel I've been wondering how useful the stacktraces actually are there and I'm still not sure.

@flupke
Copy link
Author

flupke commented Oct 5, 2023

The sourcemaps are very large I guess :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants