drupal_lookup_path()

Drupal: 
technology: 

The Drupal function drupal_lookup_path() is the biggest database access time consuming function on many Web pages and chews up ten times more than most other functions. There are some straight forward solutions and some difficult ones. Here are the problems and potential solutions.

Problem

Common database requests take less than a millisecond. On an active medium power server, you can complete five requests per millisecond. A simple page request, for complex data, requires 820 requests and uses 620 milliseconds. The delay is not a lot of requests running slowly, it is a small number of requests chewing up ridiculous amounts of time.

One DrupalDatabaseCache::getMultiple() uses 8.62 milliseconds, ten times more than any other use of the same function. drupal_lookup_path() sometimes uses 0.9 milliseonds, at other times 9 milliseconds, and occasionally 90 milliseconds.