title: Magento configurable product slow with strace showing thousands of stat calls to /usr/share/zoneinfo
body: <p>After creating a Configurable Product with roughly 120 associated products, the product page is incredibly slow to load with the Apache2 worker process spiking to 100% CPU usage. After rolling back code a few times to ensure this was nothing new that our dev team pushed, I decided to have a closer look with <code>strace</code> and was a bit shocked to find <em>thousands</em> of blocks in the output file containing the following (the query string changes, but the <code>stat</code> are always the same)</p>
  
  <pre><code>12:50:28.374278 write(23, "\202\0\0\0\3SELECT `main_table`.* FROM "..., 134) = 134
  12:50:28.374316 read(23, "\1\0\0\1\23&gt;\0\0\2\3def\7magento\nmain_table"..., 16384) = 1519
  12:50:28.374567 brk(0x7ff7f7786000)     = 0x7ff7f7786000
  12:50:28.374825 stat("/usr/share/zoneinfo/America/New_York", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
  12:50:28.374864 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  12:50:28.374934 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  12:50:28.374972 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  12:50:28.375039 stat("/usr/share/zoneinfo/America/New_York", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
  12:50:28.375078 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  12:50:28.375140 stat("/usr/share/zoneinfo/America/New_York", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
  12:50:28.375180 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  12:50:28.375239 stat("/usr/share/zoneinfo/America/New_York", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
  12:50:28.375278 stat("/usr/share/zoneinfo/UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
  </code></pre>
  
  <p>This was recorded using:</p>
  
  <p><code>$ sudo strace -Ff -tt -p &lt;pid&gt; 2&gt;&amp;1 | tee strace-apache2.log</code></p>
  
  <p>The request ran for about 36 seconds and resulted in over 110k <code>stat()</code> calls:</p>
  
  <pre><code>$ head -n2 strace-4-apache2.log 
  Process 23220 attached - interrupt to quit
  12:39:16.025656 poll([{fd=23, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
  $ tail -n1 strace-4-apache2.log 
  12:39:52.365977 poll([{fd=22, events=POLLIN}], 1, 5000
  
  $ cat strace-apache2.log | grep -i "stat.*zoneinfo" | wc -l
  110274
  </code></pre>
  
  <p>System Information is as follows:</p>
  
  <pre><code>$ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 12.04.5 LTS
  Release:    12.04
  Codename:   precise
  
  $ php -v
  PHP 5.3.10-1ubuntu3.14 with Suhosin-Patch (cli) (built: Sep  4 2014 07:08:49) 
  Copyright (c) 1997-2012 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
  
  $ apache2 -v
  Server version: Apache/2.2.22 (Ubuntu)
  Server built:   Jul 22 2014 14:35:25
  </code></pre>
  
  <p>Any input or pointers on troubleshooting this would be great, thanks for your time!</p>