reduce memory usage

see https://review.openstack.org/121191