define('LOCATION_VIEWS_UNKNOWN', t('unknown')) causes serious performance issues
lstroobant - July 6, 2007 - 15:38
| Project: | Location Views |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
location_views.module, line 9 should be written:
define('LOCATION_VIEWS_UNKNOWN', 'unknown');
by using t() for a global variable, you cause regeneration of the locale cache for every request.
See also http://drupal.org/node/65801#comment-194285
Before:
Executed 420 queries in 122.28 milliseconds. Page execution time was 1243.91 ms.
After:
Executed 243 queries in 69.71 milliseconds. Page execution time was 884.25 ms.
Thanks to Gabor Hojtsy, he pointed us in the right direct while investigating the performance issues on our site.
