-
Notifications
You must be signed in to change notification settings - Fork 160
[Draft] Cosmetic filter fb v3: full migration #497
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
base: master
Are you sure you want to change the base?
Conversation
The PR moves from per-NetworkList flatbuffers to a one (per-Engine). It doesn't affect the performance metrics, but opens a possibility to put cosmetic filters to the same flatbuffer. It also simplifies the serialization/deserialization code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust Benchmark
Benchmark suite | Current: 3d2d1f6 | Previous: 4738d3f | Ratio |
---|---|---|---|
rule-match-browserlike/brave-list |
2393919551 ns/iter (± 10342142 ) |
2252126465 ns/iter (± 13369021 ) |
1.06 |
rule-match-first-request/brave-list |
1066823 ns/iter (± 8333 ) |
1000284 ns/iter (± 8364 ) |
1.07 |
blocker_new/brave-list |
145335512 ns/iter (± 389114 ) |
150674514 ns/iter (± 1975624 ) |
0.96 |
blocker_new/brave-list-deserialize |
60332591 ns/iter (± 371687 ) |
62360204 ns/iter (± 1865060 ) |
0.97 |
memory-usage/brave-list-initial |
8803468 ns/iter (± 3 ) |
16225933 ns/iter (± 3 ) |
0.54 |
memory-usage/brave-list-initial/max |
64817658 ns/iter (± 3 ) |
64817658 ns/iter (± 3 ) |
1 |
memory-usage/brave-list-initial/alloc-count |
1547579 ns/iter (± 3 ) |
1514650 ns/iter (± 3 ) |
1.02 |
memory-usage/brave-list-1000-requests |
2516487 ns/iter (± 3 ) |
2505592 ns/iter (± 3 ) |
1.00 |
memory-usage/brave-list-1000-requests/alloc-count |
66556 ns/iter (± 3 ) |
66070 ns/iter (± 3 ) |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
pub(crate) fn filter_list(&self) -> fb::NetworkFilterList<'_> { | ||
unsafe { fb::root_as_network_filter_list_unchecked(self.data()) } | ||
pub(crate) fn root(&self) -> fb::Engine<'_> { | ||
unsafe { fb::root_as_engine_unchecked(self.data()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_COMPLEX_ID_RULES_INDEX, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_COMPLEX_ID_RULES_VALUES, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
None, | ||
) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_HOSTNAME_HIDE_VALUES, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_SIMPLE_CLASS_RULES, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_SIMPLE_ID_RULES, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_MISC_GENERIC_SELECTORS, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_COMPLEX_CLASS_RULES_INDEX, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>, | ||
>>(Engine::VT_COMPLEX_CLASS_RULES_VALUES, None) | ||
.unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] Detected 'unsafe' usage, please audit for secure usage
Source: https://semgrep.dev/r/rust.lang.security.unsafe-usage.unsafe-usage
Cc @thypon @kdenhartog
DO NOT MERGE