mg90707

Results 14 comments of mg90707

We'd appreciate an API like this, too. Or alternatively an API that allows for array pooling (e.g. passing a byte array and an integer that specifies the length of the...

@ramonsmits I think it would have to be a ReadOnlyMemory as a Spans can only exists on the Stack, not the Heap.

It also seems that the passed payload array is [copied again internally by the packet writer](https://github.com/chkr1011/MQTTnet/blob/7eb6d2d1e3d0480b89cbdafe0dc4380ea5dd055c/Source/MQTTnet/Formatter/V5/MqttV500PacketEncoder.cs#L269) to build the actual message anyway, so the message payload byte array passed in...

> Yes you are right. We have to at least change the API to ArraySegment etc. in order to deal with larger arrays from the pool. > But for me...

> But even if not: Subsequent calls to Write are OK in my opinion because or first goal is to get rid of some useless copied arrays. I would be...

>You can already play around with buffer settings at MqttPacketWriter.MaxBufferSize. If you have 85k you can try to set that to 100k. Then the internal buffer will stay at 100k...

@chkr1011 Just a small suggestion: Wouldn't just allocating a new buffer here https://github.com/chkr1011/MQTTnet/blob/b88924bce50671b4270282f4ca7ec10e429eaa49/Source/MQTTnet/Formatter/MqttPacketWriter.cs#L214 be more effective as Array.Resize also copies the old contents over to the new, shrinked buffer (at...

I just wanted to add that I have severe performance issues with the default MTU of 65520, too. Running on a Windows Host with a Linux Guest VM (Ubuntu 20.04)...

> PLC programmers seem to have more variety in variable naming vs the more conventional prpgramming world, they can have spaces in variables and its totally fine in the PLC...

As a test I just modified the "lowerFirstLetter"-function, which is responsible for the camel casing, in my node_modules to always return the original string. In my relatively simple example reading...