Skip to content

Remove redundant map for route hashes#489

Merged
topi314 merged 1 commit intodisgoorg:masterfrom
merlinfuchs:remove-rest-hash-map
Nov 12, 2025
Merged

Remove redundant map for route hashes#489
topi314 merged 1 commit intodisgoorg:masterfrom
merlinfuchs:remove-rest-hash-map

Conversation

@merlinfuchs
Copy link
Contributor

I'm guessing this map was added when there was some more expensive hashing for the endpoints involved. Right now the "hash" is just a combination of endpoint.Endpoint.Method and endpoint.Endpoint.Route.

Locking the mutex and reading from the map must be way more expensive than just computing that every time. Maybe I'm missing something here tho

Copy link
Member

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.
There was never more expensive hashing involved tho, it's probably a remnant of me porting this code from somewhere else and them using it

@topi314 topi314 merged commit c3e6150 into disgoorg:master Nov 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants

Comments