Hi Nginx experts,

While reviewing the Nginx source code, I noticed that during the conf file 
parsing, directive names are allocated from the cycle pool.
For instance:
ssl_certificate /path/to/cert/file;

It makes sense to allocate the directive's argument (e.g., the file path) from 
a pool that persists for the lifetime of the cycle, as modules generally don't 
clone these arguments but store them directly in their respective confs.
However, wouldn't it be more efficient to allocate the directive name itself 
from a temporary pool, one that only lives during the configuration parsing 
process? Since the directive name is only needed for comparison against the 
module's command array, it seems unnecessary for it to persist for the entire 
cycle.

I'd appreciate any insights or thoughts on this approach.

Best regards,
Sambhav

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to