Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reworked proxy tests to use requests_futures instead of custom threads. #2118
Consistent with how we send webhook data, proxy tests now use requests_futures' FutureSession for asynchronous requests and a proper worker pool.
FutureSession with urllib3's
Also cleaned up
Added config items:
Tested performance difference is between 10% and 30%.
Motivation and Context
Readability, consistency, performance.
Types of changes
I tested this, extensively. With a myriad of proxies. 5, 15, 20, 50, 80. The tests themselves were interesting as some proxies would be "ok" one moment and "timeout" the next. But this is not due to the PR, but the proxy. It just made testing interesting. The overall performance increase in the proxy checks themselves is good. With 7 fully functioning proxies, (no timeouts) , I experienced a about 25-30% performance increase in the proxy check. With random proxies that worked sometimes, I would experience 10-15% increase. Also, cuts down on thread usage which is a huge bonus.
Received more test reports from Alderon, Arengo, and some other people on Discord. All test results are positive, with all of them showing improvement (on minimum, median and average timing) between 10% and 30%.
I've also renamed all config items to start with