Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use stream ids for blacklisting in stream router engine. #6170
Motivation and Context
This change is a performance optimization for the stream router engine.
This blacklist contains complete
In our case comparing the two stream IDs is enough, as they can be considered unique and a mismatch between the two means that the streams are not equal. So this PR is changing the blacklist to a set of strings which allows more lightweight comparison.
Before and after were benchmarked by generating 1000 streams with 10 stream rules each which do not match, leading to a 90% skip rate of streams. Additionally, the stream rules are
After a warmup period of 20 work units, the benchmark is started by performing 30 work units for the code before and after this change. The results are the following:
This means that in some configurations, the stream router engine overhead (matching, without executing actual matchers) can be reduced by 60%.
Types of changes