performance improvement: allocate fewer buffers