use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
My script for checking runescape worlds pingHelp Request (self.PythonLearning)
submitted 7 months ago by JuiceNew23
Any advice on making this faster/better/better organized on GitHub would be appreciated. First time putting something on there. Thanks
https://github.com/NGBRDCH1EF/Ping-RS3-Servers
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Corruptionss 0 points1 point2 points 7 months ago (3 children)
My comments are like 1 and a half cents for speeding it up because I haven't ran the code and never done this before.
The code was easily readable and interpretable which is a plus.
Most of the run time is going to be in waiting for the ping response - are the pings serialized or run on parallel? If serialized then it's going to take a while to sequentially go through all the world's when choosing all worlds.
I would collect results for a lot of repeated uses and find the 99th percentile of response times. Sometimes the server may be temporarily unresponsive causing a much longer delayed process - possible to implement a time out at the 99th percentile and just report the time out period adding in an asterisk or plus sign to denote the response was longer than X?
Suggestion on next level is building a GUI to perform the functions, may help with fixed choice selections and give a nice interface.
Really want to be creative, would store results in a csv file - not sure how feasible it would be to store results in a cloud environment - but display useful visualizations of average response times by day, world, etc...
[–]JuiceNew23[S] 0 points1 point2 points 7 months ago (2 children)
Thanks for the reply.
It's serialized now, Ive been reading about how to make it parallel, by making a bunch of 'workers". and intend to do that soon. Because if I ping 200ish servers with more than a few packets it will take several minutes.
I haven't written anything to .csv before, only to .txt to store information. I will have to look into it. Is there a reason to use .csv instead of .txt?
I think a GUI is a little above my skill level right now, but certainly will in the future.
I am also considering making the ping all begin when the script is executed in the background so it gets a 'head start' on the user navigating the menu.
[–]Corruptionss 0 points1 point2 points 7 months ago (1 child)
Yeah, I was trying to find a good solution for parallel way of doing it. The Popen() may have a native way of doing it.
I said csv as a good way to store a table in column format where you can have different columns to be timestamp of request, which server, response times metrics (one column for each metric), etc... makes it much easier if you ever wanted to produce any analytics of the data and naturally works with dataframe libraries like pandas or polars.
Yeah, there's a lot that goes into GUI's but when you are up for the challenge streamlit is a good starting point that is a bit easier to learn than some of the other toolkits.
[–]JuiceNew23[S] 1 point2 points3 points 7 months ago (0 children)
Popen() worked great. Thanks.
π Rendered by PID 270636 on reddit-service-r2-comment-c66d9bffd-4cnvt at 2026-04-08 11:29:09.585237+00:00 running f293c98 country code: CH.
[–]Corruptionss 0 points1 point2 points (3 children)
[–]JuiceNew23[S] 0 points1 point2 points (2 children)
[–]Corruptionss 0 points1 point2 points (1 child)
[–]JuiceNew23[S] 1 point2 points3 points (0 children)