• Hello,

    I love this plugin and have been using it for some time, to the point where we have 10 or so different snippets running on the site.

    I was wondering if there is any performance impact by saving all of the code in separate snippets vs consolidating?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hi @fizzers,

    Snippets are fetched in one go and then executed individually. This means that technically, there is a slight difference between one big snippet or multiple small snippets, but any difference in performance would be unnoticeably miniscule. I recommend organising your snippets in the way that makes the most sense for you.

    Thread Starter fizzers

    (@fizzers)

    Ok, thanks. I also have a ton of code that’s commented out. Does that get loaded at all or is it fine to leave?

    Plugin Author Shea Bunge

    (@bungeshea)

    It will still be loaded and parsed by PHP, unless it’s in a deactivated snippet, but there won’t be any difference to if you had commented out code in a plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple snippets best practices’ is closed to new replies.