httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Rodent of Unusual Size)
Subject Re: [PATCH] Enable sortable columns in FancyIndexed directories
Date Thu, 24 Jul 1997 10:08:36 GMT
>From the fingers of Alexei Kosut flowed the following:
>On Wed, 23 Jul 1997, Dean Gaudet wrote:
>>                                      Your code here isn't thread safe.
>> It should be something like:
>Or just
>char qvalue = pstrdup(r->pool, "?.=.");

    No, I made a conscious decision to make it local storage.
    mod_autoindex can be incredibly memory consumptive as it is when
    large directories are being indexed.  While this wouldn't add much,
    every little bit counts - and there's no need for the
    pool-management overhead for five bytes.   Helps on performance as
    well as memory consumption.

    Not only wasn't my first version thread-safe, as Dean pointed out,
    but I like to think of string constants as being in read-only
    storage.  (I don't usually manage it, but it's what I *like* to do.
    ;-)  In some languages on some platforms, they *are* - and the
    run-time systems lets you know loud and clear when you start futzing
    with them.

    I'll presume that I don't need to post a revised patch before I
    commit to-morrow.  The only changes are

     o use correct length for strftime()
     o use palloc() instead of pcalloc()
     o use local storage & run-time initialisation of qvalue[]

    #ken    :-)}

View raw message