Question

I'm just wondering if doing this will cause any problems such as data loss or slower bandwidth. I may be sending 256KB of data and I want to know if I should split it into smaller chunks and send those individually or if I can just do it all at once.

Was it helpful?

Solution

Generally, at the application level, you should not worry about this. The low level software and network hardware will do a much better job than you will of splitting your data up into appropriately sized chunks based on network settings, link speeds, protocol frame/packet sizes, etc.

If anything, trying to split your data into smaller chunks, and getting it wrong, will force the network layer to generate even more smaller chunks and waste bandwidth with extra headers and overhead.

If your application is very, very performance sensitive there are things you can do to alleviate it but they are very much premature optimization -- deal with those problems if and when you actually have them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top