-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve performance by removing dubious code #217
Open
marc-vanderwal
wants to merge
2
commits into
zonemaster:develop
Choose a base branch
from
marc-vanderwal:improve-performance
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improve performance by removing dubious code #217
marc-vanderwal
wants to merge
2
commits into
zonemaster:develop
from
marc-vanderwal:improve-performance
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes code that has had a very long history and legacy. It survived over 10 years in the code base without much documentation of its purpose, either in code comments, documentation or commit messages. It’s likely that it might have been part of some debugging code paths that allow a programmer to retrieve access to objects touched by LDNS. It stores all of these objects within a few hashes. However, maintaining these hashes proves to be rather expensive. Disabling it speeds up simple runs of zonemaster-cli by roughly 3%, which is significant when Zonemaster is used to test millions of domains.
marc-vanderwal
added
the
V-Patch
Versioning: The change gives an update of patch in version.
label
Jan 22, 2025
marc-vanderwal
requested review from
mattias-p,
matsduf,
tgreenx and
MichaelTimbert
January 22, 2025 14:40
marc-vanderwal
force-pushed
the
improve-performance
branch
from
January 28, 2025 15:36
6d1e083
to
3ede58c
Compare
tgreenx
previously approved these changes
Jan 28, 2025
|
matsduf
reviewed
Jan 28, 2025
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.
MANIFEST must be updated first.
The unit test that this commit deletes tested the behavior of Zonemaster::LDNS under interpreter threads. But we never use interpreter threads in Zonemaster::Engine, so the test exercises a situation that will never occur in practice. We can therefore safely remove the file.
marc-vanderwal
force-pushed
the
improve-performance
branch
from
January 29, 2025 06:36
3ede58c
to
5eaa9b7
Compare
The failing unit test run by Travis (which runs them with |
tgreenx
approved these changes
Jan 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR improves the performance in Zonemaster::LDNS by removing undocumented code of dubious purpose.
The code in question has had a very long history and legacy. It survived over 10 years in the code base without much documentation of its purpose, either in code comments, documentation or commit messages. It is enabled only if the system Perl is compiled with support for interpreted threads, which introduces a difference in behavior that is system dependent.
The code might likely have been part of some debugging code paths so that a programmer could retrieve access to objects touched by LDNS. It stores all of these objects within a few hashes.
However, maintaining these hashes proves to be rather expensive. Disabling it speeds up simple runs of zonemaster-cli by roughly 3%, which is significant when Zonemaster is used to test millions of domains.
Context
Attempting to improve performance.
Changes
How to test this PR
Unit tests should pass.