-
Notifications
You must be signed in to change notification settings - Fork 5
[PubSubClient3] Speedup publish large messages using buffer #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
As discussed here: #29 (comment)
I think this can't be implemented like this.
We can't set pubsubclient3/src/PubSubClient.cpp Line 470 in 67eba23
But setting pubsubclient3/src/PubSubClient.cpp Line 478 in 67eba23
MQTTPINGREQ .Maybe we can just flushBuffer() here, check the rc and only if it's 0 do the MQTTPINGREQ .
To your |
Well since |
I was thinking... maybe all |
This was my first thought too. But then more things need to be rewritten ... |
And yes, at least here pubsubclient3/src/PubSubClient.cpp Line 549 in 67eba23
we should use it as well to solve #36 ... |
…fter timeout if buffer still has data to send
@TD-er Did some implementations mentioned above. Looks quite promising. If you have time you may have a look over it. |
… be done in flushBuffer())
… adding a writeBuffer() function
@TD-er We could merge pubsubclient3/src/PubSubClient.cpp Line 768 in 5b2c586
into pubsubclient3/src/PubSubClient.cpp Lines 644 to 646 in 5b2c586
and remove appendBuffer(uint8_t data) . What do you think? Might be less clear ...
|
This PR fixes #29. |
This fixes #36 |
@TD-er If you could take a look over it, I'd like to merge this. Tested it for a few weeks on a device of mine (but only uses |
As discussed here: #29 (comment)
Not yet tested, as I really need to get some sleep now...
My biggest concern right now is whether
writeNextMsgId
might also need to callflushBuffer()
first.But as I said, can't think clearly right now so if you can have a look @hmueller01