After installing memcache and boost, i'm thinking that drupal could go fast then.
But it is not.
I'm then reading the querylog for one page. It is about 356 queries and 216.52 ms. drupal_lookup_path spent almost 1/2 queries ( it is 159 queries) and 1/4 more times ( avg. 0.4 * 159 = 64 ms).
There are already someone talked about it with cache. (Yes, they could hack into path.inc and cache them...i forgot the url they talked in drupal).
And i have another way (still need hack path.inc), cause i found a lot of drupal_lookup_path are really needless. for example:
frontpage -- we still use frontpage/
rss.xml -- we wont change that
admin/content/taxonomy/edit/term/929 -- are you really care about it when editing?
search/node/\"A/S \" -- when search node, this url is good.
misc/feed.png -- the feed.png? needless, i think.
So i think, we could do a setting. The needless path alias ( just like the block url filter, you put node/edit/* there).
Load the setting(we could cache it) and to compare it in drupal_lookup_path, if it is needless, then we wont need to query {url_alias} in the database.
If you agree with me, i would do the code then.

Comments
Check out Pressflow. It has
Check out Pressflow. It has support for custom drupal_lookup_path caching in there.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
oh yes, but Pressflow is
oh yes, but Pressflow is really a new name for me.
What is your overall page
What is your overall page load time? 216ms for queries is really not bad.
oh, you remind me. maybe
oh, you remind me. maybe other part slow down the page loading.
Path alias whitelist
There are many cases where a query will be issued yet no alias would exist at all. For example, if you only alias nodes, then /user/xxx and /taxonomy/term/xxx will never return anything.
For this purpose, the patch in #106559/211 implements an automatic whitelist and not attempt to look up aliases that are certain not to exist.
See the benchmarks in the issue too.
On one live site, we found that this technique can save 200 ms per page load.
On a different front, you can cache all aliases and not hit the database at all. This can be done with the http://drupal.org/project/pathcache module, which also requires a patch to core.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Oh, that's amazing. They have
Oh, that's amazing. They have already did it.
But why the core didn't accept that?
(that post is from 2007!)
Largely because, in order for
Largely because, in order for path caching to really be effective, you have to have memcache enabled - in fact some of my testing indicates that attempting to cache paths without memcache actually slows the site down!
Not everyone who uses drupal uses memcache, though, which is why it isn't part of core.
Pressflow, a drupal variant, integrates this patch and module into their "core" release. Pressflow @ Four Kitchens
Hope that helps!
srjosh
srjosh, I use PressFlow and
srjosh, I use PressFlow and have cacherouter enabled with this config:
$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'memcache',
'server' => array('localhost:11211'),
'shared' => TRUE,
'prefix' => 'uhaaanet',
),
);
Is this setup is enough for path cache? Because xhprof show me that mysql query is one of the biggests performance holes in my site with 30k nodes (drigg).
Maybe I have to add additional memcache bins? Thanks in advance!
Adding additional memcache
Adding additional memcache bins isn't strictly necessary to get the path aliasing to work.
I'd make sure to install memcache.php (a monitoring script for memcache, comes with the pecl install of memcache) and monitor your usage of memory in that bin, though.