Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Segment the request into two parts:</p> <ul> <li>First downloads the JSON with everything except the image, return a reference to the image as a URL instead</li> <li>Second download the image as a binary chunk, potentially asynchronously depending on the app</li> </ul> <p>I'm assuming you have something like <a href="http://example.com/userinfo/xxx" rel="noreferrer">http://example.com/userinfo/xxx</a> as an endpoint that returns the JSON? Add an endpoint like <a href="http://example.com/userinfo_image/xxx" rel="noreferrer">http://example.com/userinfo_image/xxx</a> to return just the image, then you can return it as a binary chunk instead of Base64 encoding it in the JSON.</p> <p>It means you make two HTTP requests instead of one, but depending on the app you might be able to do the image load asynchronously, and if so you normally get a big gain in perceived application response time from the users perspective.</p> <p>For info about lazy loading images in the background see the post on the Android Developers blog for a sample:</p> <p><a href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html" rel="noreferrer">http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html</a></p> <p>If you can't lazy load the image consider doing parallel requests for both the image and the JSON at the same time. With the binary version of the image taking a lot less network bandwidth, and a lot less processing once you get the data onto the handset, it should still seem a lot more speedy.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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