nymea / nymea-zigbee

Zigbee library and tools for the nymea IoT stack.
GNU Lesser General Public License v3.0
3 stars 4 forks source link

Parallelize initializing the node descriptor. #42

Open mzanetti opened 2 years ago

mzanetti commented 2 years ago

This speeds up the node initialisation and so far works for every device I tested. In fact, it seems to improve behavior with sleepy devices.

Is there a known reason why this was done sequentially which would prevent this from merging?

mzanetti commented 2 years ago

I've tested this with over 30 different devices now and not a single one stumbled over it... should be good to go IMO.

t-mon commented 2 years ago

Also: assuming the endpoints initialization will be finished and the node decriptor is still trying to fetch information, you get in the upper stack the node initialized signal, but you might still not know if this is a router or end device. Doing it sequentially was assuring that all requests have finished (or timeouted) before the node moves into the initialized state.

mzanetti commented 2 years ago

Agreed, this is not good enough yet (even though in practice it works totally fine). So there's definitely room for improvement, but needs some more effort.