-
-
Notifications
You must be signed in to change notification settings - Fork 3
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 processing efficiency in check_parked.sh #409
base: main
Are you sure you want to change the base?
Conversation
Thanks! I also got to check why my test workflow isn't running for this push request. It tests the functionality of the parked check. |
Unfortunately, I have 0 experience with Github actions, so I couldn't test the script. I did test the awk code in isolation and it seemed fine. The script now checks for gawk presence - possible that it's missing? |
I managed to enable and run the action "Check for parked domains" in my fork and it seems to be running with correct output:
etc |
Try running the test-functions action. You can see the test results for removing parked domains and adding parked domains. |
Unfortunately, I can't do it right now. While the "Check for parked domains"action was running, I got this notification from Github: "GitHub Actions is currently disabled for your account. Please reach out to GitHub Support for assistance." Reach out I did, waiting for a reply. Not sure what caused this. But for now, I can't run any actions. |
@friendly-bits for 0877484 I don't think looping through This subdomain removal is also done in my other scripts (retrieve_domains.sh, validate_domains.sh, etc) so I'll keep your solution in mind if I want to improve subdomain removal for all scripts. |
Let me know what you think about the subdomain removal and do review my commit in 40bfa64 |
I believe that functionally it's the same as my commit e2c8eab, except you changed the variable name from I'll reply about subdomains removal next. |
Let's take a moment to analyze what current code is doing.
Now let's analyze the gawk-based solution.
While generally Now to put things in proportion, most likely the total resulting overheads are dwarfed by the main source of slowness, which is fetching data over the internet for each domain on a large list of domains. So in the large scheme of things, in this particular case, the efficiency of Hope all of this makes sense. |
Thanks for the clear explanation @friendly-bits I'll look more into the code later. |
Sorry I made a mess with the merge. (probably this happened because I didn't account for the commit you added and I didn't have locally) After explaining the awk script, I suddenly realized that there is no need for it to have a loop. Rather, it can simply check whether the first |
P.s. I love optimizing useful things, so feel free to ping me whenever you need help with this. |
@friendly-bits if you're using VS Code do you know of any syntax highlighting extensions for awk? Also is there a reason for using gawk instead of mawk, which I'm using on the other scripts? |
Unfortunately, no.
Only because I know that gawk is fast but I never tested mawk performance. The Busybox awk is very slow in comparison. Probably mawk is fine. |
For a more detailed reply: normally I simply copy-paste the awk command and run it on some test data. When I have a syntax error, I find that gawk is quite good at pointing to it. Initially I had a bit of trouble with awk syntax but no longer. Now I find the syntax quite simple and logical. |
Hi, here you have 2 fairly simple modifications which should improve the efficiency:
Functionally this should work same as before, except somewhat faster.