[development] strange inconsistency: 'custom_url_rewrite'
Jose A. Reyero
jareyero at wanadoo.es
Tue Dec 27 19:49:43 UTC 2005
Bèr Kessels wrote:
>And these modules should -obviously- work out of the box. we seriously cannot
>expect people to hack functions into theyr settings.php or comment away stuff
>in other modules. Especially not since we are now aiming at the installer.
>(or will the installer be so smart that it can write code for us?)
Of course not, but for final users these modules using
custom_url_rewrite maybe should be labeled somehow as not compatible
with each other.
>Apparantly this is a brick wall I ran against (head first). A brick wall we
>put there for performace reasons (good reasons, IMO, don't get me wrong).
>So I will rephrase my question then:
>* Do we want to raise inpentrable brick walls, to gain performance.
>* And if so, where do we raise them?
>* Do we raise more such walls if that helps perfomance (removing hooks, or
>* Who, where and when is decided who needs the flexibility and who needs the
Well, I guess it depends on how many people and how badly need that
function call or that hook, so in this case it looks to me like a
reasonable trade off. This is a function that can be called like a
hundred times for a single page. The question is maybe what is the
performance impact of an empty hook - called 100s of times- when no
module using it is enabled. Anyone knows?
And this one is not that simple because it's not about modules adding on
each other's results. This function has to produce a single result,
which is an url, so it doesn't fit with the general hook mechanism
either. And if you want two modules to be rewriting urls at the same
time, this should be specifically coded somehow.
But anyway if it remains not a hook at the end and our two modules are
the only ones using it, we can manage it so users dont need to hack
functions in settings.php. Maybe the first module defining the function
makes it a hook and calls the others? I know its not the perfect
solution, but if it proves to be useful, then maybe it can be a hook in
the next version. - I hope you dont want to make yours 'aaa_tagadelic'
to define the function first ;-)
More information about the development