• Leo Blanchette

    (@leoclipartillustrationcom)


    Do unused action hooks (do_action()) slow things down at all? The custom-defined ones that is. Like “do_action(“my_custom_stuff”)

    Thanks

Viewing 1 replies (of 1 total)
  • Not unless you are either on a very slow server or serving very many pages a second, no. Check the # of queries being made.

    Add this to footer.php just above </body>

    <div class="timer"><?php echo get_num_queries() ?> queries in <?php echo timer_stop(0) ?> seconds</div>

    Then add this to CSS:

    .timer {
    display:none;}

    To see # of queries review source code.

    Now, test away and review # of queries..some hosts limit # per s.

Viewing 1 replies (of 1 total)
  • The topic ‘Un-used "do action" hooks. Do they slow things down?’ is closed to new replies.