mirror of
https://github.com/bee-san/RustScan.git
synced 2026-11-07 09:46:04 -10:00
perf(scanner): keep bitmap storage out of repeated async polls
This commit is contained in:
1 parent
9b7724fed2
commit
270561d553
1 file changed
+2
@@ -33,6 +33,8 @@ use tokio::time::{sleep, timeout};
|
||||
const WORK_PER_TURN: usize = 128;
|
||||
|
||||
/// Keeps the generated order, including duplicate ports, while removing exclusions.
|
||||
// Keep the bitmap out of the async polling frame, which runs on every wake.
|
||||
#[inline(never)]
|
||||
fn filter_excluded_ports(mut ports: Vec<u16>, excluded: &[u16]) -> Vec<u16> {
|
||||
if excluded.is_empty() {
|
||||
return ports;
|
||||
|
||||
Reference in new issue
Block a user