_location_supported_countries causes a LOT of filesystem access every time it is called.
I would highly recommend caching this. Maybe even store it in a setting. Or possibly keeping a "countries.inc" file around.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | location.inc_6.patch | 3.32 KB | bdragon |
Comments
Comment #1
ankur commentedYou're right. Would you be willing to take a second to put up a patch?
Comment #2
bdragon commentedHere's a patch against the DRUPAL-4-7 branch.
I tested visiting the admin/settings/location page three times, it seems to work nicely.
Comment #3
geodaniel commentedThis patch looks good to me and applies cleanly to HEAD. This should reduce overhead quite a bit on busy sites.
Comment #4
ankur commented... Applies cleanly after running the dos2unix utility to convert the Windows linebreaks. Anyway, this has been committed to HEAD and DRUPAL-4-7.
bdragon, thanks for the patch, sorry for the wait.
Comment #5
(not verified) commented