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

Optimise sublist matching for gateways, client replies #5736

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

neilalexander
Copy link
Member

This should reduce the number of string allocations on some gateway hot paths quite considerably.

Note that MatchBytes() passes in a new option to the internal match() function to ensure a copy is taken when writing to the cache to ensure we don't create race conditions from memory reuse. This doesn't affect Match() so the behaviour there is unchanged.

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner August 1, 2024 16:44
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 92a8579 into main Aug 1, 2024
5 checks passed
@derekcollison derekcollison deleted the neil/gatewayinterest branch August 1, 2024 17:25
neilalexander added a commit that referenced this pull request Aug 6, 2024
Includes the following:

- #5690
- #5725
- #5729
- #5734
- #5735
- #5736
- #5743
- #5744
- #5751
- #5755
- #5754
- #5732
- #5750
- #5756

The following were reverted before this PR:
- #5602

Signed-off-by: Neil Twigg <neil@nats.io>
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants