Skip to content

perf: optimize scanning performance#44

Merged
fadhilyori merged 1 commit intomainfrom
perf/optimize-scanning-performance
Dec 9, 2025
Merged

perf: optimize scanning performance#44
fadhilyori merged 1 commit intomainfrom
perf/optimize-scanning-performance

Conversation

@fadhilyori
Copy link
Owner

  • Remove worker sleep after each ping to eliminate artificial throttling
  • Optimize channel buffer size from BatchSize to MaxWorkers*2 for better throughput
  • Pre-allocate results map with known capacity to prevent memory reallocations
  • Add comprehensive benchmark tests to measure performance improvements

Performance results:

  • /28 subnet (16 hosts): ~2ms execution time
  • /24 subnet (256 hosts): ~24ms execution time
  • Test execution time improved from 1.2s to 0.01s (99% improvement)

- Remove worker sleep after each ping to eliminate artificial throttling
- Optimize channel buffer size from BatchSize to MaxWorkers*2 for better throughput
- Pre-allocate results map with known capacity to prevent memory reallocations
- Add comprehensive benchmark tests to measure performance improvements

Performance results:
- /28 subnet (16 hosts): ~2ms execution time
- /24 subnet (256 hosts): ~24ms execution time
- Test execution time improved from 1.2s to 0.01s (99% improvement)
@fadhilyori fadhilyori self-assigned this Dec 9, 2025
@fadhilyori fadhilyori merged commit 24fcdfa into main Dec 9, 2025
4 checks passed
@fadhilyori fadhilyori deleted the perf/optimize-scanning-performance branch December 9, 2025 18:27
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.

1 participant