[PR #1409] [MERGED] Make errors/error reporting more lightweight #2301

Closed
opened 2026-03-16 08:46:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1409
Author: @saethlin
Created: 3/12/2021
Status: Merged
Merged: 3/12/2021
Merged by: @djc

Base: mainHead: optimize-errors


📝 Commits (3)

  • f83003b Special error type for BinDecoder and read_inner
  • 83be476 Shrink the stack size of ProtoError/ProtoResult by boxing ProtoErrorKind
  • b0cc115 Replace antecedes with plain English

📊 Changes

6 files changed (+113 additions, -64 deletions)

View changed files

📝 crates/proto/src/error.rs (+22 -3)
📝 crates/proto/src/rr/domain/name.rs (+10 -13)
📝 crates/proto/src/rr/record_type.rs (+2 -2)
📝 crates/proto/src/serialize/binary/bin_tests.rs (+3 -3)
📝 crates/proto/src/serialize/binary/decoder.rs (+63 -39)
📝 crates/proto/src/serialize/binary/mod.rs (+13 -4)

📄 Description

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.

One other question I have is how much the quality of the error messages regresses once we no longer have the actual data in decode errors.

It looks like dropping the error payloads from DecodeError does not result in a measurable improvement, so I've put them back in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1409 **Author:** [@saethlin](https://github.com/saethlin) **Created:** 3/12/2021 **Status:** ✅ Merged **Merged:** 3/12/2021 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `optimize-errors` --- ### 📝 Commits (3) - [`f83003b`](https://github.com/hickory-dns/hickory-dns/commit/f83003bc93d6c5db5dfdee2317d1d48896bf67b8) Special error type for BinDecoder and read_inner - [`83be476`](https://github.com/hickory-dns/hickory-dns/commit/83be4767a7ed075a1869c7f7cab606f29fe2cae0) Shrink the stack size of ProtoError/ProtoResult by boxing ProtoErrorKind - [`b0cc115`](https://github.com/hickory-dns/hickory-dns/commit/b0cc1154bf480ef9fc3085697890ef9095e8443e) Replace antecedes with plain English ### 📊 Changes **6 files changed** (+113 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `crates/proto/src/error.rs` (+22 -3) 📝 `crates/proto/src/rr/domain/name.rs` (+10 -13) 📝 `crates/proto/src/rr/record_type.rs` (+2 -2) 📝 `crates/proto/src/serialize/binary/bin_tests.rs` (+3 -3) 📝 `crates/proto/src/serialize/binary/decoder.rs` (+63 -39) 📝 `crates/proto/src/serialize/binary/mod.rs` (+13 -4) </details> ### 📄 Description 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. > One other question I have is how much the quality of the error messages regresses once we no longer have the actual data in decode errors. It looks like dropping the error payloads from `DecodeError` does not result in a measurable improvement, so I've put them back in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:46:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2301
No description provided.