List.traverseResultA and friends have x @ y on the error branch, this could potentially blow up
See original GitHub issueDescribe the bug
The List.traverseResultA function and similar ones have this critical path:
match state, fR with
| Ok ys, Ok y -> traverseResultA' (Ok(y :: ys)) f xs
| Error errs, Error e -> traverseResultA' (Error(errs @ e)) f xs
| Ok _, Error e
| Error e, Ok _ -> traverseResultA' (Error e) f xs
Namely: Error(errs @ e).
If you have many errors (in my situation is was importing an Excel file and all cells in a column were bad), the performance is exponential.
To solve this, one way would be a simple fix to just e :: errs the errors and do a List.rev at the end.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
git - Creating a (feature) subbranch results in the error "fatal ...
Tried to create feature/featureName. Got the error fatal: cannot lock ref 'refs/heads/feature/FeatureName': 'refs/heads/feature' exists.
Read more >Untitled
#run Http www 17track net en track, Can i get my provisional licence at 16, ... football live scores today, Friends the one...
Read more >Untitled
#New Aiims 2018 result date, Arti two face, Gta 5 online stunt jumps, 4 10 16 sequence ... Teko espresso coffee, Can we...
Read more >My thoughts on Rust and C++
Background I'm a C++ programmer who has been hearing about Rust for ... (And similarly, one could easily argue “Rust Errors > C...
Read more >Untitled
Meftah wilaya blida, Thai chow fort branch hours, Brocante 2014 marne, ... Saint seiya mauren mp3, Life is ten percent, List of oxidizing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Change looks good, thanks!
Ouch, yeah that’s bad. I mentioned the error path needs to be considered as well in https://github.com/demystifyfp/FsToolkit.ErrorHandling/issues/167 when doing a performance pass at it.