-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MAINT: Refactor auditrecords.go to loop only once #1570 #1658
Conversation
@tresni @pragmaton @mikenz @Deraen @onlyhavecans @vojtad @Papakai @svenpeter42 @tlimoncelli @kordianbruck @costasd @MisterErwin @pgaskin Hey folks! I rewrote the record audit stuff to be significantly faster and less verbose. I believe I've converted the old code properly. Please take a look. |
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.
LGTM for NS1
Looks good for DNSimple! |
LGTM for the rwth provider (although it is a blatant copy of the other providers) |
Flakey tests. They passed other times. |
Fixes #1570
The old AuditRecord does a lot of unneeded work. It loops through every record once for each test. This change loops through all the records once, calling checking functions appropriate to that record type. It also makes the format of the initializers readable.
I timed it on a small dataset and got a 1-3% improvement in total run time, I suspect that if I timed the function itself it would be more for providers that have many tests.