Vincent Ritter

Starting to mock up the profile screen. I use the red so I can see the header area nicely. Ignore the posts, they are just the normal feed for now.

There are some technical limitations with grabbing the data first time around. Here is the API call, which grabs 40 posts (although I set a count of 20) - just a bug.

That would be 7 seconds of waiting for seeing any type of profile information and posts. Setting the count to 10 (which returns 20 post items for the user) has a similar response time. That's not super great. I've spoken to Manton about this already and I'm hoping there will be a few updates to this soon.

To mitigate this, on first time load, I'm actually passing the data that I do have, from the post, to the view - this way I can show the avatar, name, username and website address straight away. Then my plan is to fire off two requests, one empty with no posts (count = 0) and one with posts. The count = 0 request usually returns under 2 seconds, which means I can grab the profile data and all other related things that I'll need to show like the following count and, of course, the bio. Then we just need to wait for the posts to come back. Once we have this data, I'm going to keep it in the cache, which means it will load from cache as soon as you come back to the particular profile. This should keep loading time to an absolute minimum.

With it loading from cache I'll do a normal request to the API, with posts, in the background so I can update it if it changes and rewrite anything we have in cache.

Close