• Resolved Cyrille Sanson

    (@css31)


    Hi,

    A developer told me that putting the code in Code Snippets instead of functions.php or a plugin loses performance.

    The argument would be that the code used via Code Snippets is in the database, whereas with a plugin the code is in a file.

    Using a file would be faster.

    What do you think about this?

    Best,

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

    (@bungeshea)

    With version 3.0.1, your snippets are fetched from the database ones and then cached with object caching, if available.

    If your hosting supports persistent caching, then the only additional overhead it just what it takes to fetch the code from the cache and iterate through it. The performance of that will depend on which object caching solution, but I imagine it would be fairly insignificant in the overall WordPress loading process.

    We are looking at introducing loading snippets from files in the future, but that’s still a few versions away.

    Thread Starter Cyrille Sanson

    (@css31)

    Hi Shea,

    Thank you very much for the explanation.

    Have a good day,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Performance’ is closed to new replies.