From: Gregg L. <gr...@li...> - 2011-01-12 12:06:42
|
On 1/12/2011 12:43 AM, Matthew Campbell wrote: > I found the source of the network collision problems I'm experiencing > when starting up MH. > > lib/Insteon_PLM.pm:poll_all() calls $obj->request_status() in a tight loop. > > Is there an existing mechanism that could be used to only queue the > status requests? > > I am looking at the loop code in > code/common/insteon_items_commands.pl:_get_next_linkscan. This is > more along the lines I am looking for, but it does not currently work > on my build. I suspect inelegant error recovery unearthed by a > mistake in my mht file. More details to follow once I figure out why > sync_all_links is dying. > > Back to my question. Does such a queue already exist, or does one need > to be implemented in poll_all()? There is not a queue of the sort that you are thinking within that portion of the insteon code in trunk. The code in the insteon branch has been completely rewritten to avoid collisions altogether and you don't see this effect at all. Unfortunately, the branch has a different set of issues as refactoring has left much of the link/memory management inoperable. I've been slowly working on this, but it remains an issue for now. From my perspective, I've orphaned the trunk code except for minor fixes (especially since I can't easily test it anymore). So, feel free to make changes if you want. But, the downside is those changes might not make it into the branch (because the design is so very different) which will eventually replace the trunk's insteon implementation. Gregg |