Hi Matthew,

The lua script will be compiled when rule is loaded and executed using lua api when rule operators are called.
So it is in different time.

I suggest you enable the debug log level and see how much time your inspecFile is spending, so you can measure the impact.



On Wed, Mar 16, 2011 at 10:37 AM, matthew sporleder <msporleder@gmail.com> wrote:
I'm using inspectFile to call a lua script for some various parts of
my requests and would like to know how to keep it very efficient.

Is the script loaded once at system startup?  Does using a chain of
inspectFile rules impact this in any way?

How does it deal with opening and closing files?  Should a file be
opened once and never closed, or opened and closed on each invocation?

Any other tips?


Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
mod-security-users mailing list
ModSecurity Services from Trustave's SpiderLabs: