Title: Sanitize &amp; Performance
Last modified: August 21, 2016

---

# Sanitize & Performance

 *  Resolved [d-media](https://wordpress.org/support/users/martijnh/)
 * (@martijnh)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/sanitize-performance/)
 * Hi,
 * Thanks for this great plugin.
 * **Sanitize**
    At what times does your plugin sanitize it’s data? On save only,
   or also on loading with ot_get_option?
 * **Performance**
    I see the options are loaded in 1 query at the start of building
   a page. So that’s nice. Which one of the methods below would you suggest performance
   wise?
 * – first one requests your function 2 times (cpu)
    – second one only once, but
   uses an extra $var (memory)
 *     ```
       if (ot_get_option('meta_author')){
       echo ot_get_option('meta_author'));
       }
       ```
   
 * or
 *     ```
       $option_name=ot_get_option('meta_author');
       if ($option_name != ''){
       echo $option_name;
       }
       ```
   
 * Thanks
 * [https://wordpress.org/plugins/option-tree/](https://wordpress.org/plugins/option-tree/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [d-media](https://wordpress.org/support/users/martijnh/)
 * (@martijnh)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/sanitize-performance/#post-4591365)
 * Moved this question to the right place: [https://github.com/valendesigns/option-tree/issues/257](https://github.com/valendesigns/option-tree/issues/257)

Viewing 1 replies (of 1 total)

The topic ‘Sanitize & Performance’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [d-media](https://wordpress.org/support/users/martijnh/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/sanitize-performance/#post-4591365)
 * Status: resolved