# (Ethernet) client.read() is SLOW

**URL:** <https://forum.arduino.cc/t/ethernet-client-read-is-slow/413915>\
**Category:** Networking, Protocols, and Devices\
**Created:** [October 19, 2016, 10:41am UTC](https://forum.arduino.cc/t/ethernet-client-read-is-slow/413915 "2016-10-19T10:41:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![helpseeker](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@helpseeker](https://forum.arduino.cc/u/helpseeker)\
**Post date:** [October 19, 2016, 10:41am UTC](https://forum.arduino.cc/t/ethernet-client-read-is-slow/413915/1 "2016-10-19T10:41:22Z")

</div>

Hi,

my program is downloading huge data from a client of my local network via ethernet. very slowly. Approx. 1-1.5 byte/second.

I'm using these commands:

_while(client.connected()){_

- while(!client.available()){delay(1);}\*

- file.write(client.read());\*  
_}_

The client is a android phone, which is connected to router via wifi. The bandwith between the phone and the pcs is excellent, so I think the problem is related to the arduino.

I swapped the file.write() command with c =... to make it overwrite a variable in the ram to see if sd card writing does have an impact. well, this improved reading speed for about 10% only.

And yes, I have Serial.read and Serial.print here and there, but not during client reading and file writing.

Any ideas how I could improve this?

Big thanks

---

<div class="post-metadata">

**Author:** ![SurferTim](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/surfertim/32/1072341_2.png) [@SurferTim](https://forum.arduino.cc/u/SurferTim)\
**Post date:** [October 19, 2016, 11:54am UTC](https://forum.arduino.cc/t/ethernet-client-read-is-slow/413915/2 "2016-10-19T11:54:12Z")

</div>

I use this.

```cpp
while(client.connected()){
    while(client.available()){              
      file.write(client.read());
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 11:02am UTC](https://forum.arduino.cc/t/ethernet-client-read-is-slow/413915/3 "2021-05-06T11:02:27Z")

</div>

Closed on May 6, 2021, 11:02am UTC


