[Feature request]: Network scan speed is slow. Suggestion (and implementation) for improvement.
Is your feature request related to a problem? Please describe
I have a 24 router network and I use the Network topology viewer a lot. The main issue I have with it is loading speed.
With 2 routers offline, it takes 75s to load the data and 75s on any update.
Describe the solution you'd like
I've been thinking the polling could be parallelized.
With AI support I developed an extension that implements that plus better handling of assumed-offline routers (poll them all in parallel at the end with a 5s timeout, no retry)
It works very well. Initial load (with no offline-info store) takes 35s. Almost twice as fast. Subsequent loads are even faster (17s) for my current network state.
I published the proposed extension as a PR here: https://github.com/Koenkk/zigbee2mqtt-user-extensions/pull/32
I'd be very happy if someone (anyone) with the same issue would test this.
Extension README.md for more info: https://github.com/omcular/zigbee2mqtt-user-extensions/blob/networkmap-fast/unstable/networkmap_fast/README.md
Describe alternatives you've considered
I have not found any alternatives.
Additional context
Here is a screenshot of my network for context:
I experienced (as has been experienced by many users before) a "hang" of a scan. It never returns.
This is not specifically related to my extension, it also occurs in the "normal" network scan code everyone uses.
It's worse than just "scan never returns" and I have a PR out to zigbee_herdsman that fixes the issue: https://github.com/Koenkk/zigbee-herdsman/pull/1922