icing / mod_h2

HTTP/2 module for Apache httpd
https://icing.github.io/mod_h2/
Apache License 2.0
256 stars 41 forks source link

Possible optimization in h2_c2_create() #274

Open mkauf opened 10 months ago

mkauf commented 10 months ago

The function h2_c2_create() takes a bucket allocator as a parameter (apr_bucket_alloc_t *buckt_alloc), but this parameter is not used.

The function creates a new bucket allocator:

c2->bucket_alloc           = apr_bucket_alloc_create(pool);

It could be an optimization to use the bucket allocator that has been passed as a parameter:

c2->bucket_alloc           = buckt_alloc;

I don't know whether this is correct - feel free to close this issue if it's a bad idea.