> just that, too.  Any performance comparisons with its competitors?
Some quick performance comparison results between mod_sed, mod_line_edit and
mod_substitute.

Search/Replace string : s/hello/hi/
test0.html : No matches, so no substitute.
test.html  :  1 comparision/substitute
test2.html : 500 comparision/substitute

Performance data was generated with 200 clients for 100000 requests (for worker
mpm).
$ ab -c 200 -n 100000 <http-uri>

Requests Per Second (RPS) as measured by ab for s/hello/hi/ substitution.
                 mod_sed              mod_line_edit           mod_substitute
test0.html        3263                   3206                   3129
test.html         3229                   3213                   3197 
test2.html        1278                   404                    1130

Note that mod_sed performs better than either mod_line_edit or mod_substitute.

Here is the configuration :
--------------------------
Alias /testsed/ "/usr/local/apache2/htdocs/testsed/"
LoadModule sed_module modules/mod_sed.so
<Directory "/usr/local/apache2/htdocs/testsed">
    Options FollowSymLinks
    AllowOverride None
    AddOutputFilter Sed html
    OutputSed "s/hello/hi/g"
</Directory>

Alias /testled/ "/usr/local/apache2/htdocs/testled/"
LoadModule line_edit_module modules/mod_line_edit.so
<Directory "/usr/local/apache2/htdocs/testled">
    Options FollowSymLinks
    AddOutputFilter line-editor .html
    AllowOverride None
    LERewriteRule "hello" "hi" [R]
</Directory>

Alias /testsub/ "/usr/local/apache2/htdocs/testsub/"
LoadModule substitute_module modules/mod_substitute.so
<Directory "/usr/local/apache2/htdocs/testsub">
    Options FollowSymLinks
    AllowOverride None
    AddOutputFilter SUBSTITUTE html
    Substitute s/hello/hi/
</Directory>
--------------------------

Regards,
Basant.


Reply via email to