optimize rbuffer init