Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
path.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2006 at 09:28 UTC
Updated:
30 Dec 2006 at 17:01 UTC
calls to drupal_lookup_path('source', $path) will not cache negative results, resulting in the same database query potentially getting called several times on the same page view. This patch adds a cache for those negative results
| Comment | File | Size | Author |
|---|---|---|---|
| path-negative-source-cache.patch | 928 bytes | Wesley Tanaka |
Comments
Comment #1
mfbYes, it would be nice to avoid duplicate searches that previously returned false. But the proposed solution - introducing a new static variable - seems inefficient. Can't we find a way to reuse the existing $map variable? E.g., use $path as the key rather than the value, and set $map[$path] = FALSE. (Yes, we'd need to rework the code a bit.) (Mark and Nedjo)
Comment #2
Tobias Maier commentedi think the following issue fixes this as well:
http://drupal.org/node/65493
setting this to duplicate
Comment #3
Wesley Tanaka commentedI guess we're trying to describe a dependency relationship, rather than a duplicate? the issues are different. I've subscribed to
http://drupal.org/node/65493 and will follow that instead of this.
Comment #4
(not verified) commentedComment #5
Wesley Tanaka commentedI discovered that this patch wasn't applying for me anymore. I looked at my path.inc (v 1.4.2.4) and it seems that this bug has been fixed, and thus can't be a duplicate of the still-open http://drupal.org/node/65493
Comment #6
Wesley Tanaka commentedactually, i'm not sure that this is fixed in 4.7, but current HEAD has the logic of the original patch applied (albeit with different variable names).
see bug 103665
Comment #7
(not verified) commented