Answers.Body: <p><strong>Yes,</strong> Twig will parse it all down to PHP before running it. It stores the rendered PHP in a <code>/storage/runtime/compiled_templates/</code> file.</p>
  
  <p><strong>No,</strong> Craft will not run anything inside the conditional if it's <code>false</code>. At that point, it's simply processing exactly as normal PHP would.</p>
  
  <p>So no, you shouldn't be notably penalized for anything inside a falsey <code>if</code> statement.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-18T16:09:10.597Z
Answers.LastActivityDate: 2017-08-18T16:09:10.597Z
Answers.UserDisplayName: Lindsey D
Body: <p>Does Craft parse the contents of a false/negative/empty conditional statement? So would you take a performance hit if you had a big chunk of code inside a conditonal that was false?</p>
  
  <pre><code>{% set foo = "foo" %}
  {% if foo == foo %}Small code {% else %} MASSIVE CODE{% endif %}
  </code></pre>
  
Tags: <conditional>
Title: Does Craft parse requests inside a conditional if it is false?
ThreadText: # Does Craft parse requests inside a conditional if it is false?
  
  (Asked by: username_0 on 2017-08-18)
  
  Does Craft parse the contents of a false/negative/empty conditional statement? So would you take a performance hit if you had a big chunk of code inside a conditonal that was false?
  
  ```
  {% set foo = "foo" %}
  {% if foo == foo %}Small code {% else %} MASSIVE CODE{% endif %}
  
  ```
  
  **Tags:** conditional
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-18. Score: 3 | Accepted answer
  
  **Yes,** Twig will parse it all down to PHP before running it. It stores the rendered PHP in a `/storage/runtime/compiled_templates/` file.
  
  **No,** Craft will not run anything inside the conditional if it's `false`. At that point, it's simply processing exactly as normal PHP would.
  
  So no, you shouldn't be notably penalized for anything inside a falsey `if` statement.
  
  
  ---
  
  