httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff McAdams <je...@iglou.com>
Subject Re: mod_substitute docs
Date Thu, 14 Feb 2008 14:26:00 GMT
Jim Jagielski wrote:
> 
> On Feb 14, 2008, at 9:06 AM, William A. Rowe, Jr. wrote:
> 
>> Eric Covener wrote:
>>> Anyone else +1 for flatten-as-default and providing an option such as:
>>> 'q'uick: Substitute more efficiently, but further substitutions will
>>> not be able match across the boundaries of this substitutions
>>> replacement string.
>>
>> +1, anything requiring this depth-of-understanding is prone to be a
>> problem.
>>
>> The optimization would have to know that the smallest pattern-match space
>> is some (x) characters long, and unconditionally do a set-aside of (x-1)
>> characters of trailing data from each bucket, to match across calls.
>>
>> Flatten is so much simpler for the casual user.
>>
> 
> And sooo much slower (and memory extensive)... I submit that
> the vast majority of people would NOT require it and thus
> should not be subjected to the overhead.
> 
> But that's just my own 2c :)

Speaking as a "mere" end user.  :)

I would be terribly, extremely, frustrated to add a second substitution
and have it not work, only to find out later on that I needed to set
some magic flag that affects some operation down in the deep bowels of
the code that has no visible change to the operation (not counting
performance...the actual result would be the same, if taking longer and
hitting more system resources).

The principle of least surprise says to make flattening the default and
provide a flag for optimization that might break things...because then
at least the user is reading *some* sort of documentation specifically
about the flattening to be able to know about the flag and hopefully
that documentation will include the caveat that it could break things.

I guess that's my 2 yen (roughly the same value, but from a different place)
-- 
Jeff McAdams
"They that can give up essential liberty to obtain a
little temporary safety deserve neither liberty nor safety."
                                       -- Benjamin Franklin


Mime
View raw message