web server unexpected operation

twilkers:
I didn't expect each print or write would be a separate packet. We also have 3 cameras on the system and a weather station.

Regarding pacing, it does update a chunk at a time, sometimes the chunks are bigger than others. I thought the variability was due to other network traffic.

Would you have a suggestion on how to better optimize the scheme?

Thanks,

in your loops where you are writing one decimal value with a comma and space separator, try this:

#define BUFFERLEN=256;

char buf[BUFFERLEN]; // if you have enough  free ram?
int b=0;
for(int a=0;a<max;a++){
  b+=sprintf_P((char*)buf[b],PSTR("%d, "),sample[a]);

  if (b>(BUFFERLEN-10)){ // buffer is almost full so print it
    // each time through the loop, the maximum added to buffer should only be 5+2+1,(5 digits, comma,space, and the \0 string terminator
    client.print(buf);
    b=0; // reset buffer point back to beginning
    }
  }
if(b!=0){ // somthing left over in buffer print it
  client.print(buf);
  b=0;
  }
}

Chuck.