Skip to content
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

Fix: Significant performance improvements to ScopeManager #351

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

0xdade
Copy link
Member

@0xdade 0xdade commented Jul 23, 2020

Through a custom request, it was discovered that ScopeManager had a huge overhead when initializing on large sets of CIDR ranges. E.g. when you load several thousand single ip addresses in as individual scopeitems. In the test data that I used, these changes took initialization time from 50+ minutes down to only 500ms.

Additional tests written for the scope manager, file names updated to match style.

@0xdade 0xdade added server affecting natlas-server performance Directly related to improving performance labels Jul 23, 2020
@0xdade 0xdade requested a review from ajacques July 23, 2020 06:27
@codeclimate
Copy link

codeclimate bot commented Jul 23, 2020

Code Climate has analyzed commit b8f5b55 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

View more on Code Climate.

natlas-server/app/scope/scan_manager.py Outdated Show resolved Hide resolved
natlas-server/app/scope/scope_manager.py Outdated Show resolved Hide resolved
natlas-server/app/static/natlas.scss Outdated Show resolved Hide resolved
@0xdade 0xdade force-pushed the scope_manager_improvements branch from d94fbeb to d627250 Compare July 23, 2020 06:50
Through a custom request, it was discovered that ScopeManager had a huge overhead when initializing on large sets of CIDR ranges. E.g. when you load several thousand single ip addresses in as individual scopeitems. In the test data that I used, these changes took initialization time from 50+ minutes down to only 500ms.

Additional tests written for the scope manager, file names updated to match style.
@0xdade 0xdade force-pushed the scope_manager_improvements branch from d627250 to b8f5b55 Compare July 23, 2020 07:03
@0xdade 0xdade merged commit 055ff41 into natlas:main Jul 23, 2020
@0xdade 0xdade deleted the scope_manager_improvements branch July 23, 2020 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Directly related to improving performance server affecting natlas-server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants