Improve memory usage in openvgdb sync thread.