mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
This change keeps a list of probes awaiting retransmit so that doAnyOutstandingRetransmits doesn't have to search for them. At high scan rates this function could take 100 ms or more. Now I have measured it to take 2 ms or less. The variable num_probes_waiting_retransmit has been renamed num_probes_timed_out to better explain its purpose. This list of probes that can be retransmitted immediately is called probes_waiting_retransmits, but not all timed-out probes can be retransmitted immediately. I've done my best to explain the distinction in comments. I thought long and hard about how to address this issue, and this is what I decided on. But of course, every little optimization brings some complexity and the chance of making a mistake. I'd appreciate someone taking a look at this change.
194 KiB
194 KiB