Decreasing number of queries with drupal_lookup_path patch

Hello.

Now our team works on the project that is built on Drupal 5.3 with many modules plugged in and has a lot of content.
A lot of functionality is already implemented and now I'm researching performance problem.

Number of queries is a real problem.

I implemented some caching for several modules but number of queries still to high.

I'm using devel module for researching.

I found that drupal_lookup_path executed very often so I wrote some enhancement for this Drupal core function.

Drupal code (in includes/path.inc):

    if ($action == 'alias') {
      if (isset($map[$path])) {
        return $map[$path];
      }
      $alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path));
      $map[$path] = $alias;
      return $alias;
    }

with my changes:

// in the static variables definition part
static $searched = array();

if ($action == 'alias') {
if (isset($map[$path])) return $map[$path];

$last_symbol = substr($path, -1, 1);
if ($last_symbol >= '0' && $last_symbol <= '9') {
$path_mask = substr($path, 0, -1);
if (!isset($searched[$path_mask])) {
$searched[$path_mask] = true;
$result = db_query("SELECT src, dst FROM {url_alias} WHERE src LIKE '%s_' LIMIT 10", substr($path, 0, -1));

Javascript on Menu.

Please help....

I am making a menu wherein its path is a javascript but whenever I click the menu it's href is a series of characters not the one I made. Then it leads to a page not found error. Is there a way where I can make javascript readable in the menus section of drupal....??

Thanks a lot in advance...

Recent Popular Content??

I've enabled and edited the Recent Popular Content option under Admin > Site building > Views.

I've set it to appear in a block, displaying recent page-views and am using this as a sort of taxonomy work-around. There is a list of five top stories appearing in my block, but regardless of how many times I click on different articles, they never make their way to the top of the list as they should. The list never changes.

I have access permissions set for everyone, including: admin, anonymous users, and authenticated users.

4 problems with Drupal (an article on Drupal performance)

An interesting article on Drupal performance, i stumbled upon i thought might be interesting read for the community

URL Alias/Clean URL

Hi,

I have encountered a situation wherein I should have aliases for URL of some specific nodes/pages. But if I use Clean URL it actually converts all nodes to clean URLs. For example out of 500 nodes all I need to implement the URL aliases are for 10 specific pages. Is there a modules that can do this. One more thing, I am afraid to use clean UR$L for there are Server Configuration required and I am don't even have a drop of knowledge regarding server configurations.

Thanks in advance.

Blog user merge

How can I make Blogger A merge with Blogger B wherein their blog would merge as one. For example a new account was created (assuming blogger B) and Blogger A wants that all entries made by blogger B would be added to Blogger A's Blog.

Please help.....

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Performance and scalability