swap out custom buffer size logic with bestBufferSize