Hello!
On Wed, May 30, 2012 at 4:51 PM, Sparsh Gupta <
spars...@gmail.com> wrote:
> Hello Yichun
>
> Hope you are doing good. I wanted to use pcre_jit on; directive in my
> nginx (openresty) configuration and hence I thought I will compile
> openresty with
>
> --with-pcre=/usr/src/pcre-8.30/ --with-pcre-jit
>
> options. I realized I installed libpcre3-dev library using my
> repository manager and hence was not sure if this is the best way to
> go about this. I depend a lot on regular expressions and hence think
> pcre-jit will help me optimize my configurations
>
Yeah, sure. Your options look good to me :)
And you can specify the "j" regex option when using ngx_lua's ngx.re.*
API to enable this PCRE JIT support. And "j" should always be used
with "o". If the regexes you're using have unlimited variants, then
you should not use either "j" or "o".
The only way to make sure the "j" option for ngx.re.* actually takes
effect is to enable nginx debug logs and check some line like below in
your error.log:
[debug] 5154#0: *2 pcre JIT compiling result: 1
If it is "0" instead of "1" in this line, then PCRE JIT is disabled
for some reason.
Regards,
-agentzh
P.S. I'm cc'ing the openresty mailing list so that other people can
see this too :)