• Resolved jlooooo

    (@jlooooo)


    Hi,

    Just some feedback about performance. I noticed my website slowed down with 3,5 s when I enabled Super Socializer. With the Query Monitor plugin I discovered it had to do with the bit.ly url shortener. I use a custom post type to render ‘custom blocks’ where needed. Unfortunately, the bit.ly feature makes a http request to the bit.ly api for every post on the page. With 10 custom posts this took 2.6s…

    Could you please only make a bit.ly api call when a user shares something? Would be great.

    For now I just disabled the bit.ly api again, but I would love to enable it again for my users.

    Cheers!

    https://ww.wp.xz.cn/plugins/super-socializer/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rajat Varlani

    (@the_champ)

    Hi there,
    Thanks for reporting this. I will definitely try to improve this in future releases.

    Thread Starter jlooooo

    (@jlooooo)

    Thanks

    Plugin Author Rajat Varlani

    (@the_champ)

    Hi,
    I have included the functionality to cache short urls in the latest version of the plugin so that request will not be sent to bitly server on each page load. Kindly update your plugin.

    Thread Starter jlooooo

    (@jlooooo)

    Hi,
    Doesn’t sound as the best solution. Wouldn’t it be better to only make the api call if a user clicks a button to share somehting?

    Plugin Author Rajat Varlani

    (@the_champ)

    In the solution you are suggesting, API call will be made each time the share button is clicked. Say your website has 100 visitors per day. If 75 of them share the content, bitly API would be called 75 times a day. Furthermore, this will introduce some delay between the ‘click on icon’ and ‘appearance of sharing window’.
    What I have done – Plugin will call the bit.ly API on first page load and will cache the short urls for the subsequent page loads. So in above scenario, API call will be made only once for these 75 shares a day and even subsequent shares for that webpage.
    Isn’t it better? 🙂

    Thread Starter jlooooo

    (@jlooooo)

    Sound better indeed 🙂

    Would it be possible to enable/disable by post_type? I use custom post_types to create banners, boxes etc. No need to share this stuff, hence no need to make an bit.ly api call at all.

    Plugin Author Rajat Varlani

    (@the_champ)

    Sorry, it cannot be enabled based on post/page type for now. I will try to do something about it in future releases.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Create conditional bit.ly api requests’ is closed to new replies.