Slow Json parsing in android

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ManjitSaha
    New Member
    • Aug 2020
    • 1

    Slow Json parsing in android

    I am using wordpress rest api to fetch data and i am only fetching 10 posts at a time using volley.

    When i request api in browser it gives me result under 6-7 seconds...

    But my app takes more than 15 sec to show that 10 posts.

    I set a connection timeout in 30 seconds..and asks to retry.
    Sometimes, i have to retry 1-2 times. Which Means sometimes it takes more than 1 minute to show data.


    Why ?
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 656

    #2
    The more specific question along with code, the more accurate and specific answer.

    How about fetching one, two, or three post(s) at a time so that the user has something to look at meanwhile others are being fetched?
    How about using multiple threads in parallel?
    How about upgrading the API plan (if any) for faster speed?
    What's the baseline performance of API? What's the average response time of the endpoints mentioned in the official docs? Seconds sounds a lot high. It should be in ms.

    Comment

    Working...