sharkwouter / minigalaxy

A simple GOG client for Linux
https://sharkwouter.github.io/minigalaxy/
GNU General Public License v3.0
1.1k stars 71 forks source link

Use threads to speed up connectivity check #576

Closed orende closed 1 year ago

orende commented 1 year ago

Description

Adds a ThreadPoolExecutor to the api.can_connect function in order to send the requests to embed.gog.com and auth.gog.com from separate threads. This lowers the worst case execution time from 10 seconds to 5 seconds, which is noticeable on slow connections.

Checklist

sharkwouter commented 1 year ago

Nice, that makes more of a difference than I was expecting. Thanks!