drupal_lookup_path trying a different approach

Events happening in the community are now at Drupal community events on www.drupal.org.
ajayg's picture

As most of us on this group are aware, drupal_lookup_path queries DB multiple times and several patches have been tried to fix this. None of it is in core yet. This discussion http://drupal.org/node/106559 has several patches and related links.

I tried to tackle this in a different way with an alias table with 50 records. I changed the engine for url_alias table from MyIsam to MEMORY. My reasoning was making it memory resident will give me almost the same (but not exact) benefit of memory resident array or variable the previous folks have tried. And it won't require any patches etc.

  1. To my disappointment I have found absolutley no difference by making the table memory resident. This is very surprising. Is this correct behaviour as the overhead of mysql parsing+compling are negating the benefit of entire table in memory (since it is a small table of 15 records)? Or my approach is right but I am doing something reall strange? I did confirm phpMyAdmin was showing the engine as Memory for the url_alias table before running the benchmark.

  2. Is there another way where apache can load this list in memory at startup and I can refer from my php code from inside my own drupal_lookup_path?

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week