Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Overhead on HTTP connection comes from the headers that it sends along with your data (which is basically a constant). So the more data you send, the less the headers 'hurt you'. However, the much more important aspect to consider is <strong>encoding</strong>.</p> <p>For example, if you are sending non-ASCII data, paired with a mime type of <code>application/x-www-form-urlencoded</code> you run the risk of exploding the input size because non-ASCII characters must be escaped.</p> <p>From the <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4" rel="nofollow noreferrer">spec</a>:</p> <blockquote> <p>The content type "application/x-www-form-urlencoded" is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type "multipart/form-data" should be used for submitting forms that contain files, non-ASCII data, and binary data.</p> </blockquote> <p>The alternative is <code>multipart/form-data</code> which efficient for binary data. So, make sure your application is using this MIME type (you can even probably check this on your server logs).</p> <p>Another method which can considerably reduce your upload time is <strong>compression</strong>. If you are uploading data which isn't already compressed (most image and video formats are already compressed) try adding gzip compression to your uploads. <a href="https://stackoverflow.com/questions/1573391/android-http-communication-should-use-accept-encoding-gzip">Another post</a> shows the details of setting this up in android.</p> <p>If your data is of a specific format (say an image), you can look into lossless compression algorithms for your type of data (png for images, FLAC for audio, etc.). Compression always comes at the price of CPU (battery), so keep that in mind.</p> <h3>Remember:</h3> <p>Don't optimize something until you know its the bottleneck. Maybe your server's connection is slow, maybe you can't read from the android file system fast enough to push your data to the network. Run some tests and see what works.</p> <p>If it were me, I would <em>not</em> implement the straight tcp approach. Just my 2 cents, good luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload