Better time management of serial port. Allow small time window for new data. Repeat the time window as long as new data is arriving. When no more data arriving, process next request.