Cut down heap memory usage.

Signed-off-by: Thorben Hasenpusch <thorben.hasenpusch@gmail.com>