reduce build script memory footprint