Open AliKhalili opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.
Author: | AliKhalili |
---|---|
Assignees: | - |
Labels: | `area-System.Threading`, `untriaged` |
Milestone: | - |
Sliding window is quite similar to the fixed window approach but different in that it also has a segment per window option. Technically, we can consider fix window algorithm as a special case of sliding window algorithm for resource rate limiting. So, regarding DRY and have a more clear code base, I would suggest remove fix window internal implementation and inherit it from the sliding window class. The only needed change is on the fix window constructor initialize base class(sliding window instance) with
SegmentsPerWindow = 1
.We can also expect not remarkable performance to degrade with using an array with a segment for fix window. I am keen to know your thoughts. Thanks cc: @BrennanConroy