Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By matteo on
Hi all,
I'm trying the new CVS Drupal 4.3.
I'm suffering from performance, and I noticed of 'SELECT * FROM PATH' statements; I did not understand where the instruction is generated....
I'm not using path.module....
Any ideas ???
P.S. Drupal 4.3 is GREAT !!!!
Comments
path table
I would be surprised if the 'SELECT * FROM PATH' statement is the cause. Unless you are doing a database write to the paths table, that query will only be called once per request. Do you have a lot of aliases created in your paths table?
It might be best to disable your modules one by one and analyze the performance gain as you iterate through this process.
The reason that the path query runs even though the path modules is disabled is to maintain the integrity and of any aliases that are in existance. Enabling this module simply provides you an interface to maintain and create aliases.
Not using path at all
I'm pretty sure that is the cause.
To give you an idea, to display the home page (set to node), these are the statistics:
Executed 243 queries in 173.93 microseconds
Of these 243 queries, around 100 are 'select * from path'.
I'm not using path AT ALL, so I'm a little surprised to see that the call is executed every time for nothing.
Probably a patch should check that if you're not using path, that call should be avoided....
Should I open a request to development ??
Matteo
mailto:webmaster@cantincoro.org
Problem
I checked on my setup and that query is only executed once. That said, I'm sure the problem triggers when you have no aliases set; $map is empty end nothing is cached ...
Bypass to the problem
As a bypass, in common.inc file I added the following line:
if (!module_exist("path")) return $map; // avoid select if path is not used
after the following lines:
function drupal_get_path_map($action = "") {
static $map;
so that, i I don't use path.module, at least the select is not performed.
Since I don't know the logic, this is only a bypass.
From 243 calls, they're not 93 !!
It is not clear to me what is the purpose of setting path.... am I forced to set it ???
Thanks for all
Matteo
mailto:webmaster@cantincoro.org
fixed
This issue was fixed by Dries and is in CVS now.