Skip to content

Conversation

@tangopium
Copy link

Fixed Issue of exceeding selectors.

The problem with the ranges is, that if the first rule that contributes to a range has more than 1 selector, the total amount of selectors in that range will exceed the limit.

For example: lets say we want to get the second split with the range [4096..8191]. In the current implementation, if there is a rule with 100 selectors that starts at selector index 4000, it will be part of the current split (because 4000 + 100 = 4100, which lies inside the range [4096..8191]). As a result the limit in this range could be exceeded by up to 95 selectors (especially if there are no selectors truncated at the end of the range). I therefor propose a rolling window.

Fixed Issue of exceeding selectors.

The problem with the ranges is, that if the first rule that contributes to a range has more than 1 selector, the total amount of selectors in that range will exceed the limit.

For example: lets say we want to get the second split with the range [4096..8191]. In the current implementation, if there is a rule with 100 selectors that starts at selector index 4000, it will be part of the current split (because 4000 + 100 = 4100, which lies inside the range [4096..8191]). As a result the limit in this range could be exceeded by up to 95 selectors (especially if there are no selectors truncated at the end of the range). I therefor propose a rolling window.
@jhilden
Copy link
Contributor

jhilden commented Sep 28, 2016

thanks for finding that bug and fixing it right away. 👍 could you please add a regression test case to your PR?

@tangopium tangopium closed this by deleting the head repository Feb 24, 2023
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