Buffer reading optimization