Re: Optimization, modern C and APR 2.0 onwards

2015-11-21 Thread Jim Jagielski
Yeah, it was the hash improvement (in fact, I use that exact
algo w/ proxy) as well as the pool enhancements (esp related
to fragments) which would be super cool to pull in.


> On Nov 20, 2015, at 6:08 PM, Greg Stein  wrote:
> 
> On Fri, Nov 20, 2015 at 4:19 PM, Yann Ylavic  wrote:
> On Fri, Nov 20, 2015 at 11:14 PM, William A Rowe Jr  
> wrote:
> > On Fri, Nov 20, 2015 at 2:55 PM, Yann Ylavic  wrote:
> >>
> >> On Fri, Nov 20, 2015 at 8:00 PM, Jim Jagielski  wrote:
> >> > If we are serious about having a serious update to APR, I
> >> > would recommend that we use more up-to-date data structures,
> >> > patterns and algorithms than those in apr1. For example,
> >> > Greg's pocore mini lib is an example of the types of improvements
> >> > we should consider.
> >>
> >> Could you share a pointer to it please?
> >
> >
> > https://github.com/gstein/pocore
> 
> Thanks!
> 
> Jim may have other items in mind, but I believe its notable improvements are:
> 
> * hash tables built upon modern research
> * pools that avoid long-term memory fragmentation, including free() capability
> * structured error handling
> 
> As a solid test of the pocore library, I patched APR to use pocore's pools 
> and hash tables (see apr/branches/gstein-pocore/) and then ran Subversion's 
> extensive test suite. Except for tests depending upon hash table iteration, I 
> got it all working just fine. pocore's pools are faster than APR (tho both 
> are screaming fast, in the scheme of things), APR pools on top of pocore 
> kinda slowed down the tests :-P
> 
> I'd be more than happy to discuss its design, both now and future direction 
> (eg. memory coalescing is intended, but not yet implemented).
> 
> Cheers,
> -g
> 



Re: Provide our own impl of str[n]casecmp()?

2015-11-21 Thread Yann Ylavic
On Sat, Nov 21, 2015 at 12:59 PM, Branko Čibej  wrote:
> On 21.11.2015 09:31, Graham Leggett wrote:
>> On 21 Nov 2015, at 12:11 AM, William A Rowe Jr  wrote:
>>
>>> Any objections to picking this up for APR 1.next/2.0?
>>>
>>> It seems that httpd isn't the only one who wants to be strict about
>>> case-insensitive token string recognition, and non-POSIX char case
>>> gets weird quickly.
>> +1 to this.
>>
>> Ideally we should add it to APR, and then provide a convenience function in 
>> httpd that has the same implementation when the function in APR is missing, 
>> and use the APR function when present.
>
> Does it matter that this implementation assumes that the runtime
> encoding is a superset of ASCII? (FWIW, it doesn't even handle the
> Unicode Latin-1 range).

It doesn't matter IMHO, strcasecmp() is defined in the POSIX ("C")
locale only, and this implementation is equivalent to any strcasecmp()
in that locale (though strcasecmp() run in another locale could
produce different results for chars >127).

The goal would be an efficient implementation on all platforms, for
ASCII text only (e.g. tokens), where '\xC9' ('É') would be different
than '\xE9' ('é') but meh :p

Maybe we could choose another name to avoid any confusion,
apr_tokencmp() or apr_casecmpstr[n]() (à la cpystrn)?


Regards,
Yann.


Bug report for APR [2015/11/22]

2015-11-21 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|16056|Inf|Enh|2003-01-14|Shared memory & mutex ownership not correctly esta|
|20382|New|Nor|2003-05-31|Poor performance on W2000 AS  |
|28453|New|Enh|2004-04-18|apr_uri should parse relative to a base URI   |
|33188|Inf|Nor|2005-01-21|libtool linking failure on Suse   |
|33490|Inf|Nor|2005-02-10|APR does not compile with Borland C++ |
|38410|New|Nor|2006-01-27|apr/win32 misinterpreted the meaning of WAIT_ABAND|
|39289|New|Enh|2006-04-12|test suite additions for trylock functions|
|39853|Inf|Nor|2006-06-21|apr_strtoi64 does not build on WinCE due to lack o|
|39895|New|Enh|2006-06-23|apr_os_strerror on WinCE needs to xlate unicode->u|
|39896|New|Enh|2006-06-23|Output test status to OutputDebugString in additio|
|40020|New|Enh|2006-07-11|Add support for apr_uint8_t and apr_int8_t types  |
|40193|Inf|Nor|2006-08-06|Patches to support different compiler than EMX on |
|40622|New|Enh|2006-09-27|enhance apr temp files on NT to be more secure|
|40758|Ver|Maj|2006-10-15|WIN64, apr_vformatter(..) cannot handle 64bit poin|
|40939|New|Enh|2006-11-09|pool minimal allocation size should be configurabl|
|41192|Inf|Trv|2006-12-17|Add the expat libtool file to the LT_LDFLAGS varia|
|41254|New|Enh|2006-12-28|apr_queue_t enhancements  |
|41351|Inf|Enh|2007-01-11|Tivoli LDAP SDK support in aprutil|
|41352|Inf|Min|2007-01-11|openldap and per-connection client certificates in|
|41916|Inf|Nor|2007-03-21|MinGW cross-compile support for Linux |
|42365|New|Enh|2007-05-09|Suppress console for apr_proc_create() created pro|
|42682|New|Maj|2007-06-17|Apache child terminates with signal 11 when using |
|42728|New|Nor|2007-06-23|mod_ssl thread detaching not releasing handles|
|42848|New|Enh|2007-07-10|add IP TOS support to apr_socket_opt_set()|
|43035|New|Enh|2007-08-04|Add ability to wrap ssl around pre-existing socket|
|43066|New|Nor|2007-08-08|get_password on Windows is kludgy |
|43152|Inf|Nor|2007-08-16|apr_socket_opt_get doesn't work with APR_SO_SNDBUF|
|43172|Ass|Nor|2007-08-20|apr-util don't want to find mozldap-6.x   |
|43217|New|Min|2007-08-26|All-ones IPv6 subnet mask not accepted|
|43244|New|Enh|2007-08-29|apr_socket_t missing dup, dup2 and setaside   |
|43302|New|Nor|2007-09-04|apr_bucket_socket doesn't work with non-connected |
|43309|New|Enh|2007-09-05|add apr_socket_sendtov support|
|43375|New|Nor|2007-09-13|Pool integrity check fails for apr threads|
|43499|New|Nor|2007-09-27|apr_global_mutex_create returns error "Access deni|
|43507|New|Enh|2007-09-28|configure flag for SHELL_PATH |
|43508|New|Enh|2007-09-28|Please be available whether atomics use thread mut|
|43793|New|Enh|2007-11-04|builtin atomics on Windows|
|44127|New|Enh|2007-12-21|File Extended Attributes Support  |
|44128|New|Enh|2007-12-21|apr_os_file_put() does not register a cleanup hand|
|44129|New|Enh|2007-12-21|apr_os_dir_put() does not allocate an entry buffer|
|44186|New|Nor|2008-01-08|[PATCH] Add memcached 1.2.4 features to apr_memcac|
|44230|New|Enh|2008-01-14|Add Ark Linux support to config.layout|
|44432|New|Enh|2008-02-15|patch - proposal for application function hooks   |
|44550|Inf|Maj|2008-03-06|Solaris sendfilev() handling - EINTR appears to ha|
|45251|New|Nor|2008-06-22|DBD MySQL driver doesn't support multiple resultse|
|45291|New|Nor|2008-06-26|apr_thread_t is leaking   |
|45298|New|Maj|2008-06-27|apr_os_thread_get() differs between windows and un|
|45407|Opn|Nor|2008-07-16|auto reconnect in apr_dbd_mysql disturb normal wor|
|45455|New|Nor|2008-07-22|rwlock sometimes allows a writer to take the lock |
|45494|Opn|Nor|2008-07-28|testsockets fails on Solaris when IPv6 interfaces |
|45496|New|Enh|2008-07-29|[patch] adding directory matching [dir/**/conf.d/*|

Re: Provide our own impl of str[n]casecmp()?

2015-11-21 Thread Graham Leggett
On 21 Nov 2015, at 12:11 AM, William A Rowe Jr  wrote:

> Any objections to picking this up for APR 1.next/2.0?
> 
> It seems that httpd isn't the only one who wants to be strict about 
> case-insensitive token string recognition, and non-POSIX char case
> gets weird quickly.

+1 to this.

Ideally we should add it to APR, and then provide a convenience function in 
httpd that has the same implementation when the function in APR is missing, and 
use the APR function when present.

Regards,
Graham
—



Re: Provide our own impl of str[n]casecmp()?

2015-11-21 Thread Branko Čibej
On 21.11.2015 09:31, Graham Leggett wrote:
> On 21 Nov 2015, at 12:11 AM, William A Rowe Jr  wrote:
>
>> Any objections to picking this up for APR 1.next/2.0?
>>
>> It seems that httpd isn't the only one who wants to be strict about 
>> case-insensitive token string recognition, and non-POSIX char case
>> gets weird quickly.
> +1 to this.
>
> Ideally we should add it to APR, and then provide a convenience function in 
> httpd that has the same implementation when the function in APR is missing, 
> and use the APR function when present.

Does it matter that this implementation assumes that the runtime
encoding is a superset of ASCII? (FWIW, it doesn't even handle the
Unicode Latin-1 range).

-- Brane