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
Make errors/error reporting more lightweight #1409
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1409 +/- ##
==========================================
- Coverage 85.16% 85.10% -0.06%
==========================================
Files 153 153
Lines 15035 15042 +7
==========================================
- Hits 12804 12801 -3
- Misses 2231 2241 +10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I really like how simple these changes are. Based on your research, we probably want to make all Errors Box their Kinds?
Let's discuss the one defensive thing that was removed.
I've been toying with ways to shrink the sizes of the error types, and yeah I think this is probably the best approach. There isn't really one type or pattern that's responsible for the error size situation; as far as I can tell it's mostly a bit of nesting here and a bit of nesting there. Nest just 2 levels and suddenly you've blown up the size at the top level. One could run around |
Yup, I agree. @djc, do you have any concnerns? I know you've been reviewing most of these changes, but this looks good to me. |
Most of this looks good to me. I'd probably have put the changes around |
Together, I measure these commits to be a 13% improvement in
Message
parsing speed. If there are changes in here that make anyone uncomfortable I'm happy to back them out. If they are indeed improvements, they'll become more obvious as I continue to knock time off the benchmark.It looks like dropping the error payloads from
DecodeError
does not result in a measurable improvement, so I've put them back in.