i think this might be getting more complex than it needs to be  you are only batching the port delete and update events  which you have already converted into cheap operations that just mark a network as dirty  so my suggestion is to get rid of this queue and get rid of the changes to everything except for the port update and delete  then just have the update and delete methods mark the network as dirty and then have this helper reload the dirty networks  that will essentially achieve the same reduction in reload calls without any queue management logic  does that make sense 