You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by js...@apache.org on 2004/01/23 01:10:05 UTC
cvs commit: jakarta-jmeter/src/functions/org/apache/jmeter/functions RegexFunction.java
jsalvata 2004/01/22 16:10:05
Modified: src/protocol/http/org/apache/jmeter/protocol/http/modifier
URLRewritingModifier.java
src/functions/org/apache/jmeter/functions RegexFunction.java
Log:
Add READ_ONLY_MASK to a couple of regexp compilations
where it was missing. It's absence is known to cause
performance problems when the compiled pattern is used
concurrently by multiple threads.
PR: 26023
Revision Changes Path
1.26 +4 -4 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java
Index: URLRewritingModifier.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- URLRewritingModifier.java 15 Dec 2003 01:04:11 -0000 1.25
+++ URLRewritingModifier.java 23 Jan 2004 00:10:05 -0000 1.26
@@ -166,12 +166,12 @@
pathExtensionEqualsRegexp =
JMeterUtils.getPatternCache().getPattern(
";"+argName + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?",
- Perl5Compiler.MULTILINE_MASK);
+ Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK);
pathExtensionNoEqualsRegexp =
JMeterUtils.getPatternCache().getPattern(
";"+argName + "([^\"'>&\\s;]*)[&\\s\"'>;]?$?",
- Perl5Compiler.MULTILINE_MASK);
+ Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK);
parameterRegexp =
JMeterUtils.getPatternCache().getPattern(
@@ -190,7 +190,7 @@
+ "\\s[Nn][Aa][Mm][Ee]\\s*=\\s*[\"']"
+ argName
+ "[\"']",
- Perl5Compiler.MULTILINE_MASK);
+ Perl5Compiler.MULTILINE_MASK | Perl5Compiler.READ_ONLY_MASK);
// NOTE: the handling of simple- vs. double-quotes could be formally
// more accurate, but I can't imagine a session id containing
// either, so we should be OK. The whole set of expressions is a
1.18 +1 -1 jakarta-jmeter/src/functions/org/apache/jmeter/functions/RegexFunction.java
Index: RegexFunction.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/functions/org/apache/jmeter/functions/RegexFunction.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- RegexFunction.java 5 Oct 2003 00:52:25 -0000 1.17
+++ RegexFunction.java 23 Jan 2004 00:10:05 -0000 1.18
@@ -67,7 +67,7 @@
valueIndex = between = name = "";
try
{
- templatePattern = compiler.compile("\\$(\\d+)\\$");
+ templatePattern = compiler.compile("\\$(\\d+)\\$", Perl5Compiler.READ_ONLY_MASK);
}
catch (MalformedPatternException e)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org