aboutsummaryrefslogtreecommitdiff
path: root/plugins/zyklonb/youtube
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-31 20:07:20 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-31 21:43:23 +0100
commita850ee45f189dc4afd935f967ee7e5fa4168a2d9 (patch)
treecaf7e94445c37d4e638bbb8c2c14766e7597ca37 /plugins/zyklonb/youtube
parent10a264ec3d189ba0fc00e4c6f7b0e7e4a8043aff (diff)
downloadxK-a850ee45f189dc4afd935f967ee7e5fa4168a2d9.tar.gz
xK-a850ee45f189dc4afd935f967ee7e5fa4168a2d9.tar.xz
xK-a850ee45f189dc4afd935f967ee7e5fa4168a2d9.zip
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.
Diffstat (limited to 'plugins/zyklonb/youtube')
0 files changed, 0 insertions, 0 deletions