stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Check for Extension Updates in Parallel
Description
- a simple description of what you're trying to accomplish: Check the updates for all Extensions at once rather than one by one
- On my system, checking updates for a dozen Extensions now only takes around 1 second, and after applying the updates, everything still works fine.
- a summary of changes in code: Make the
for ext in exts:loop multi-threaded using thethreadingpackage
Checklist:
- [X] I have read contributing wiki page
- [X] I have performed a self-review of my own code
- [X] My code follows the style guidelines
- [X] My code passes tests
Though, I'm not sure if the shared.state parts should be changed or not...
somehow I feel like the possibility of requesting hundreds of fetch to github is a bad idea
so I made some minor changes mainly rewriting it using ThreadPoolExecutor and setting a deafault limit of 16
and add some Atomic sections such as updating progress bar and Reporting on errors
do you think the number should be higher than 16?
fun fact I about 200 extension installed, (10 enabled, 190 disabled)
there is also the --update-all-extensions cli arg
which currently is not concurrent
if that is to be made concurrent I'm not sure using a setting value is a good idea