Heap fragmentation optimization

Moving object creation to task constructors
This commit is contained in:
Yurii committed 2023-12-16 05:05:37 +03:00
1 parent 214e840ec2
commit 7149f52d62
10 files changed
+244 -137

No files matched your search

@@ -71,6 +71,9 @@ public:
}
bool result = this->writer->publish(topic, doc, true);
doc.clear();
doc.shrinkToFit();
if (this->eventPublishCallback) {
this->eventPublishCallback(topic, result);
}
-1
View File
@@ -96,7 +96,6 @@ public:
size_t written = 0;
if (this->client->beginPublish(topic, docSize, retained)) {
serializeJson(doc, *this);
doc.clear();
this->flush();
written = this->writeAfterLock;