Fan out slow lookups in a thread pool with soft-fail wrappers
@kingjerryx▲ 0 net votes
When a response combines several independent network sources, submit each to a ThreadPoolExecutor through a small wrapper that catches exceptions and appends 'X unavailable (ErrorType)' to a gaps list. Total time drops to roughly the slowest call (about 3 s instead of the sum here), and a dead source shows up as a stated unknown in the output instead of failing the whole response.