After much discussion on the list, I actually wrote some code that takes a pass at reducing the number of drupal_get_path requests,<br><br><a href="http://drupal.org/node/75976">http://drupal.org/node/75976</a><br><br>I talked some with Moshe on IRC (thanks!) and this patch is not intended to do anything but let developers test whether this approach gives us any real performance gains.
<br><br>In this first pass, all I did was put in the structure that would allow an administrator to remove certain paths from ever being looked up. This approach required a modification of url() and a new function to handle lookup requests. This function is drupal_alias_allowed($path).
<br><br>In the current patch, all paths are still allowed, as the default array is null.<br><br>To be honest, I tried to do more, but Forms API and admin settings gave me some problems. I'd like to do a textarea for entering 'allowed' paths one per line, but couldn't make the code behave properly.
<br><br>Without an admin, the way to test is to alter the variable_get within drupal_alias_allowed(), I would suggest making that value: array('node', 'user'), which would allow the creation of aliases only for paths the start with 'node' or 'user.'
<br><br>Feedback welcome.<br><br>- Ken Rickard<br>agentrickard<br><br><br><br>