From a850ee45f189dc4afd935f967ee7e5fa4168a2d9 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sun, 31 Jan 2016 20:07:20 +0100
Subject: degesch: optimize buffer memory usage
We have approximately 5 formatter_items per buffer_line. Let's assume
we're on a 64-bit machine. Then there were (5 * 2) + 3 useless pointers
(104 bytes) as well as 5 * (4 + 4) = 40 bytes of wasted space because
of needless padding. That's 144 bytes already. Compared to that, this
change adds 16 bytes of overhead for an array sentinel, i.e. 128B less.
With a limit of 1000 lines per buffer, we've saved ~128kB per buffer
on completely useless data, and code complexity stays roughly the same.
All in all, memory usage for buffers should be about 50% lower.
---
NEWS | 2 ++
1 file changed, 2 insertions(+)
(limited to 'NEWS')
diff --git a/NEWS b/NEWS
index f19388c..60e07d3 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@
* degesch: backlog limit was made configurable
+ * degesch: optimize buffer memory usage
+
* kike: add support for IRCv3.2 server-time
* Remote addresses are now resolved asynchronously
--
cgit v1.2.3-70-g09d2