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

Subscription performance improvements #352

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

wazzamatazz
Copy link
Contributor

This PR makes changes designed to improve the performance of real-time data and event subscriptions:

  • PatternMatchingExtensions.Like improvements to prevent creation of Regex instances if a pattern does not actually contain any wildcards.
  • Increased default channel capacity and faster cancellation detection for all subscriptions.

`PatternMatchingExtensions.Like(string?, string)` will perform a simple `string.Equals` call if the match pattern does not actually contain any wildcard characters (`*`, `?`).

All overloads of `PatternMatchingExtensions.Like` will now return `false` if the string to match against the pattern is null.
`SubscriptionManagerOptions.ChannelCapacity` is now 10 000 by default instead of 100.
`SubscriptionChannel` now uses `RunIngressLoop`'s cancellation token in conjunction with `ChannelReader<T>.TryRead` for faster cancellation detection.
@wazzamatazz wazzamatazz merged commit 4b31e0e into develop/3.1.0 Sep 26, 2023
1 check passed
@wazzamatazz wazzamatazz deleted the subscription-performance-improvements branch September 26, 2023 08:46
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.

None yet

1 participant