On 1/20/22 3:52 PM, William A Rowe Jr wrote:
> On Thu, Jan 20, 2022 at 5:09 AM <yla...@apache.org> wrote:
>>
>> Author: ylavic
>> Date: Thu Jan 20 11:09:34 2022
>> New Revision: 1897240
>>
>> URL: http://svn.apache.org/viewvc?rev=1897240&view=rev
>> Log:
>> ap_regex: Use Thread Local Storage (if efficient) to avoid allocations.
>>
>> PCRE2 wants an opaque context by providing the API to allocate and free it,
>> so
>> to minimize these calls we maintain one opaque context per thread (in Thread
>> Local Storage, TLS) grown as needed, and while at it we do the same for PCRE1
>> ints vectors. Note that this requires a fast TLS mechanism to be worth it,
>> which is the case of apr_thread_data_get/set() from/to apr_thread_current()
>> when APR_HAS_THREAD_LOCAL; otherwise we'll do the allocation and freeing for
>> each ap_regexec().
>>
>> The small stack vector is used for PCRE1 && !APR_HAS_THREAD_LOCAL only now.
>
> It's good to keep iterating on this, for now, but when I wrote the
> patch both pcre1 & pcre2
> were supported by an author, if not a whole community.
>
> I don't believe the project can or should ship support for httpd
> 2.6/3.0/next with support
> for a dead library. But it's better not to rip it out just yet.
I guess we can rip it out of trunk once we backported the PCRE2 support to 2.4.x
and some month without issues in 2.4.x have passed.
Regards
RĂ¼diger