rumqtt
                                
                                 rumqtt copied to clipboard
                                
                                    rumqtt copied to clipboard
                            
                            
                            
                        Rumqttc/no panics and improved performance
- 
No longer panics when a PubAck, PubComp or PubRec paket is received with a pkidoutside of the inflight range.
- 
Avoid cloning Publishmessages with QoS=1 or QoS=2. Also avoid cloning aPublishin case of a collision. Cloning is rather expensive as all the memory has to be duplicated (topic and payload).
- 
Use a bitset for incoming_pub. This drops memory from 256 KiB to just 8 KiB. Also use a bitset foroutgoing_rel, but as this is limited to justmax_inflightthe saving are usually much less.
- 
Factor out code that maintains the list of currently inflight Publish messages into ds.rs. I have some code that makes the data-structures interchangeable, but as that required some generic traits I have not included it here.
Thanks!! These are a good list of changes. I'll run these through benchmark suite
Hi. Sorry for the delay on this. I was in a vacation. I'm on a time crunch and I might not get enough time to properly test these changes. Can you create smaller PRs with a subset of features?
Other option is to wait until I have some time in hand to test these properly
@tekjar Hi, yes I think that PR grew too big. I will have to split this into several independent PRs. Most importantly for me is to get away with panics in case of out-of-range packet ids. But also the unneccessary cloning of Publish is something that I want to go away. I think, the first 4 commits will fit into a separate PR. Then I will make a PR that will use the same data structure as rumqttc is using right now, but that will fix the panics.