Esp8266 communication with arduino

Any suggestions?

Yes. Stop expecting all serial data to arrive within some defined period of time. Look at Ronin2's tutorial (again and again, if needed). Deal with the arrival of serial data as it arrives. USE the data that has arrived ONLY when the end-of-packet marker (whatever that is, in your case) arrives. You will NOT find delay(), or any variation of it, anywhere in Robin2's tutorial.