Title: does shortcodes impact performance
Last modified: December 3, 2022

---

# does shortcodes impact performance

 *  Resolved [battarov](https://wordpress.org/support/users/battarov/)
 * (@battarov)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/does-shortcodes-impact-performance/)
 * Hi.
    in my project the site speed is very important and there will be thousand
   of posts to be migrated to the new site which is under development. I found there
   is a whole shorcodes system in pods to design templates. while its a great feature
   which will speed up the building process , but is there any affect to the site
   performance when we use templates over pure php.
 * as an example in facetwp filtering plugin documentation they said that using 
   their template builder is a plus for speed because it calles a separated api 
   to enhance performance .
 * So what is your advice regarding pods templating for mid to large sites.

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

 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/does-shortcodes-impact-performance/#post-16257348)
 * Pods shortcodes use a fresh object each time you have a shortcode. If you have
   100 shortcodes on a page (like an archive) then that can end up producing extra
   DB queries and additional memory usage.
 * It’s not a huge amount depending on the use-case but I’ve always considered using
   PHP to be the most performant option if you are looking for scale and customization.
 * For instance, instead of `[pods name="your_pod" id="1234" field="your_field"]`
   you would essentially use something like this: `echo pods( 'your_pod', 1234 )-
   >display( 'your_field' );`
 * However, for the best performance, you would want to set up your Pods object 
   ahead of any loops. Here’s an example:
 *     ```
       $pod = pods( 'your_pod' );
   
       // start your loop logic here
       foreach ( $whatever as $id ) {
           $pod->fetch( $id );
   
           echo 'whatever you want';
           echo $pod->display( 'your_field' );
       }
       // end loop
       ```
   
 *  Thread Starter [battarov](https://wordpress.org/support/users/battarov/)
 * (@battarov)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/does-shortcodes-impact-performance/#post-16257466)
 * thanks a lot, that was really helpfull.

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

The topic ‘does shortcodes impact performance’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

## Tags

 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * 2 replies
 * 2 participants
 * Last reply from: [battarov](https://wordpress.org/support/users/battarov/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/does-shortcodes-impact-performance/#post-16257466)
 * Status: resolved