• Resolved ditrovic

    (@ditrovic)


    Hi,

    I’m a big fan of the Photonic plugin… it’s the only one I know who has proper support for collections. And working at a school, we use a lot of collections.

    The only problem I have with all my WordPress sites that use Photonic for Flickr, is that the page keeps blank until all albums in one collection are loaded. That sometimes can take up to 15 seconds… which is a long time showing nothing. The speed is not a big problem, but the blank screen is. Is it possible to load the collections/albums after the page is loaded? So you can see them appear one after another?

    Or is there something I can do to make the collections appear faster?

    Let me know if you need more info.
    I’m not a fan of posting links on a forum. ??

    Thanks a lot,

    Ditrovic

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Unfortunately, given how Flickr’s API returns collections, this is always going to be slow. Let me try to explain.

    The collections API has one public method – flickr.collections.getTree, but this returns very little information. True, it returns the name of a collection, its thumbnails and included sets, but there is no information about the sets apart from the id, title and description. Specifically, there is no information about the thumbnails for the set, how many photos are in it etc. To get this second level of information, I pretty much have to iterate through each of the sets, and each is an individual API call. So, if you have 5 collections and underneath them you have a total of 50 albums, you will be really hitting the server very hard.

    Can the page be shown while the collections are being fetched? Not the way it is currently built. All the fetching and processing activities for collections (and pretty much everything else) happens in the back-end. There are many reasons for this including keeping down JavaScript bloat and ensuring proper indexing of pages by search engines. But as a by-product, until the post content is fully generated, it will not come to the front-end. There is no way to selectively show the content early, because it is not that the images are taking a long time to load; the problem is that the server itself is taking long to generate the content (i.e. the text + images). The lazy display of photos is already built in: the text shows up first, while the JS engine tries to figure out how to lay out the pictures, and the images come up when ready.

    I could consider a solution wherein collections are processed via the front-end but everything else is in the front-end, but I cannot commit to a timeline for it, since it is going to be quite a big change.

    As an alternative to speed things up, why not consider separate pages for each collection? The plugin is noticeably faster if you are displaying a single collection.

    Plugin Author Sayontan Sinha

    (@sayontan)

    An update: I have finished making the changes for “lazy loading” of collections. See the last example on the demo page.

    This update isn’t live yet, because I am waiting for the Instagram folks to approve my ID, without which the plugin will break for many users.

    Thread Starter ditrovic

    (@ditrovic)

    Dear Sayontan,

    Thank you very much for replying so fast and trying to find a possible solution.
    Your last example on the demo page is a leap forward in loading the page faster, I’ll be happy to try it out.

    Flickr could have done a lot more with those collections…

    So thanks again, you made my day.

    Plugin Author Sayontan Sinha

    (@sayontan)

    I have released a new version (1.59) with this capability. The documentation is on the demo page.

    I am closing this thread, unless you think it should still remain open.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page loads very slow with flickr collections’ is closed to new replies.