When path_set_alias is called without any arguments except the path i.e. path_set_alias('node/'. $node->nid); then it causes the path cache to be reset via drupal_clear_path_cache(). This occurs when the alias is being deleted from the url_alias table even when no records are actually removed.

This is a performance issue because drupal_clear_path_cache calls drupal_lookup_path() with an action of 'wipe', when used in conjunction with the pathcache module this results in an unnecessary cache clear of the cache_pathdst and cache_pathsrc cache tables. As an additional performance hit, when using a memcached caching backend this results in memcache_variable_set("cache_flush_$table", time()); being called, and the entire variables cache being rebuilt.

CommentFileSizeAuthor
#4 1863834-4-path_alias_delete_cache.patch500 bytestsphethean
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es). View
#1 1863834-1-path_alias_delete_cache.patch451 bytestsphethean
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1863834-1-path_alias_delete_cache.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

tsphethean’s picture

FileSize
451 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1863834-1-path_alias_delete_cache.patch. Unable to apply patch. See the log in the details link for more information. View
tsphethean’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1863834-1-path_alias_delete_cache.patch, failed testing.

tsphethean’s picture

Status: Needs work » Needs review
FileSize
500 bytes
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es). View

Oops, lazy patch first time round. Proper patch this time.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.