WordPress.org

Ready to get started?Download WordPress

Forums

Un-used "do action" hooks. Do they slow things down? (2 posts)

  1. Leo Blanchette
    Member
    Posted 1 year ago #

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

    Thanks

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic