cgorski / glow-control

Aa Rust-based command-line interface (CLI) and library for controlling Twinkly programmable LED controllers.
Apache License 2.0
7 stars 1 forks source link

Parallelize Discovery Code #33

Open cgorski opened 1 month ago

cgorski commented 1 month ago

The discovery code that underlies the discover command currently runs sequentially. For a handful of devices this is unlikely an issue, but for many devices, discovery could take an excessive amount of time, even possibly requiring a longer timeout value to avoid the premature end of discovery. That is, discovery is O(n) with respect to the number of devices.

Parallelize the discovery code so that multiple threads or tasks can run concurrently to discover n devices in O(1) time.

JanDiederich commented 1 month ago

Please see my PR #34, related to this issue.