Spectacu.la Discussion
How can I reduce update time? (4 posts)

  1. byqsri
    Posted 4 years ago #

    I would reduce the update time I try to change
    $defaults['polling'] to 5 seconds in options-page.php but the update is always executed after 10 seconds
    Are there other modifications to do ? For example to javascript?
    Many Thanks


  2. interconnectit
    Plugin Author

    Posted 4 years ago #


    There are checks in the JS too. Look for

    parseInt( commentingL10n.polling, 10 ) >= 10 ? commentingL10n.polling * 1000 : 10000 )

    If you do change the js you'll need to re-minify it or at very least copy the file over to commenting.min.js

    You'll also want to change the validate_options method in options-page.php around the $output[ 'polling' ] = intval part, although just changing the default will do it's not quite complete.

  3. byqsri
    Posted 4 years ago #

    Ok thanks .
    For minify the javascript what tool is used in wordpress?

  4. interconnectit
    Plugin Author

    Posted 4 years ago #

    I use YUI Compressor to minify my JS. There may be better out there but that's the one I've been using for a while and it's served me well.
    You don't need to actually run a minify on the js file you just need to be sure that any changes you make to commenting.js are copied over to commenting.min.js even if that just involves deleting .min.js and renaming the other to commenting.min.js. Alternatively you could just change the line in commenting.php that points to the min.js file to point to the .js file instead.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Spectacu.la Discussion
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic