On 22 Jul 2006, at 11:06, Gerhard Killesreiter wrote:
Sounds like a good idea. The magic number should probably be set to some fixed value and have a variable_get without a visible interface.
Unless somebody comes up with an easy way to calculate the magic number. :p
Or a configuration option, rather than a magic number. Or add a LRU- flag to the alias table, and pre-load a subset of the aliases that are most recently used. You'll probably end up with a hit rate of at least 80%. You wouldn't need a magic number or a configuration setting. Another improvement might be to stop executing SQL queries at the point where all aliases are known to be in the local alias cache. It wouldn't make a difference for sites with many aliases, but for small sites that only alias their primary links, it might make a big difference. Patches? :) -- Dries Buytaert :: http://www.buytaert.net/