WordPress.org

Support

Support » Plugins and Hacks » Simple Share Buttons Adder » [Resolved] The counter option slows down the loading of webpages

[Resolved] The counter option slows down the loading of webpages

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Simple Share

    @davidoffneal

    Hi Carlo,

    The counters shall always have some effect, 45 seconds is indeed far longer than it should be though! You are the first to report this, so I’d be keen to hear more about your website/server setup.

    Do the counts show up eventually and display as they should if you wait?

    I’ll try and put a max execution time that returns no counts for any sites that take too long.

    Thanks

    Hi David,

    It concerns http://supersnelgezond.nl

    The system runs on

    Processor Name QEMU Virtual CPU version 0.9.1
    Vendor ID AuthenticAMD
    Processor Speed (MHz) 2400.142
    Total Memory 3923532 kB
    Free Memory 1677460 kB

    with

    Exim 4.76 Running
    Apache 2.2.25 Running
    MySQL 5.5.31 Running
    Php 5.3.27 Installed

    and the latest version of WordPress (always up to date) and a bunch of plugins. Including an old (the only old one) version of Quick Cache (20111203), since that was the best one before they changed it into a free and paid version which contained a lot of bugs. I did switch that cache plugin off trying to trouble shoot and find out why the pages were loading so slow. It did not make any difference.

    I tested again this morning, enabling the counters.

    Tested              Load Time   Page Size  Requests	Page Speed
    April 28 09:36:10	1.75 s	    923.5 kB   127	    73
    April 28 09:35:41	5.98 s	    709.0 kB   127	    72

    The difference is not that big anymore, but stil a 4 seconds difference. The biggest time spend was on the “wait time” (or time to first byte), which was 2,9 seconds (http://fpt.pingdom.com#!/cvdCC6/http://supersnelgezond.nl/zuur-base-tabel-alkaline-dieet/).

    Still love your plugin, though. 🙂 I am only using is without the counters now.

    Hope this helps, Carlo

    Hi!

    I’m programing a website in localhost, using WAMP and Windows 8.1 and have the same problem.
    The counters have a slow loading in the page, very seconds.
    I’ll deploy this site in a webserver with LAMP in this week, and can’t enable this feature for the client until this fix be released.
    I believe that this delay is the way you retrieve the information from the counters. Take a look at this plugin https://wordpress.org/plugins/social-count-plus/
    https://github.com/claudiosmweb/social-count-plus
    It may help = D

    I “solved” it by lazy loading the share buttons with javascript.

    Yuri Filus, share with us?

    Sure!

    Add this in your javascript:

    var $share = $(".post-share"); // Share buttons container
    if ( $share[0] ) {
      $share.hide();
      var shareUrl = templateDir + '/include-share.php'; // Assign variable templateDir before script load <script>var templateDir="<?php bloginfo('template_directory'); ?>";</script>
      $.ajax({
        type: "GET",
        url: shareUrl,
        data: { url: document.URL },
        success: function(data) {
          $share.html(data)
            .slideDown(); // Some crazy effects
        }
      });
    }

    And create include-share.php in the root folder of your theme:

    <?php
      require_once( "../../../wp-load.php" );
      echo do_shortcode('[ssba url="' . $_GET['url'] . '"]');
    ?>

    Hope it helps!

    which javascript file?

    Thanks Yuri Filus o/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] The counter option slows down the loading of webpages’ is closed to new replies.
Skip to toolbar