Permalink
Browse files

[maven-release-plugin] copy for tag 4.1-alpha1

  • Loading branch information...
2 parents 18e1a19 + ca7284c commit 20680fe03f69525debd3f02323acda46a3890e30 @ok2c ok2c committed Dec 4, 2009
View
@@ -14,7 +14,10 @@ functionality improvements and new features.
* Support for transparent content encoding. Please note transparent content
encoding is not enabled per default in order to avoid conflicts with
already existing custom content encoding solutions.
-
+
+* 5 to 10% performance increase due to elimination of unnecessary Log object
+ lookups by short-lived components.
+
Please note all methods and classes added in this release and marked as
4.1 are API unstable and can change in the future 4.1 ALPHA releases.
@@ -69,9 +72,16 @@ This is a bug fix release that addresses a number of issues discovered since
the previous stable release. None of the fixed bugs is considered critical.
Most notably this release eliminates eliminates dependency on JCIP annotations.
+This release is also expected to improve performance by 5 to 10% due to
+elimination of unnecessary Log object lookups by short-lived components.
+
Changelog
-------------------
+* [HTTPCLIENT-895] Eliminated Log lookups in short lived objects impairing
+ performance.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCLIENT-885] URLEncodedUtils now correctly parses form-url-encoded
entities that specify a charset.
Contributed by Oleg Kalnichevski <olegk at apache.org>
@@ -738,6 +738,7 @@ protected RequestDirector createClientRequestDirector(
final UserTokenHandler stateHandler,
final HttpParams params) {
return new DefaultRequestDirector(
+ log,
requestExec,
conman,
reustrat,
@@ -29,8 +29,6 @@
import org.apache.http.annotation.NotThreadSafe;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.http.params.HttpParams;
import org.apache.http.params.AbstractHttpParams;
@@ -73,8 +71,6 @@
@NotThreadSafe
public class ClientParamsStack extends AbstractHttpParams {
- private final Log log = LogFactory.getLog(getClass());
-
/** The application parameter collection, or <code>null</code>. */
protected final HttpParams applicationParams;
@@ -211,10 +207,6 @@ public Object getParameter(String name) {
if ((result == null) && (applicationParams != null)) {
result = applicationParams.getParameter(name);
}
- if (this.log.isDebugEnabled() && result != null) {
- this.log.debug("'" + name + "': " + result);
- }
-
return result;
}
@@ -135,7 +135,7 @@
@NotThreadSafe // e.g. managedConn
public class DefaultRequestDirector implements RequestDirector {
- private final Log log = LogFactory.getLog(getClass());
+ private final Log log;
/** The connection manager. */
protected final ClientConnectionManager connManager;
@@ -204,7 +204,8 @@ public DefaultRequestDirector(
final AuthenticationHandler proxyAuthHandler,
final UserTokenHandler userTokenHandler,
final HttpParams params) {
- this(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler,
+ this(LogFactory.getLog(DefaultRequestDirector.class),
+ requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler,
new DefaultRedirectStrategyAdaptor(redirectHandler),
targetAuthHandler, proxyAuthHandler, userTokenHandler, params);
}
@@ -214,6 +215,7 @@ public DefaultRequestDirector(
* @since 4.1
*/
public DefaultRequestDirector(
+ final Log log,
final HttpRequestExecutor requestExec,
final ClientConnectionManager conman,
final ConnectionReuseStrategy reustrat,
@@ -227,6 +229,10 @@ public DefaultRequestDirector(
final UserTokenHandler userTokenHandler,
final HttpParams params) {
+ if (log == null) {
+ throw new IllegalArgumentException
+ ("Log may not be null.");
+ }
if (requestExec == null) {
throw new IllegalArgumentException
("Request executor may not be null.");
@@ -275,6 +281,7 @@ public DefaultRequestDirector(
throw new IllegalArgumentException
("HTTP parameters may not be null");
}
+ this.log = log;
this.requestExec = requestExec;
this.connManager = conman;
this.reuseStrategy = reustrat;
View
20 pom.xml
@@ -173,7 +173,27 @@
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.docbook</groupId>
+ <artifactId>docbook-xml</artifactId>
+ <version>4.4</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
<configuration>
+ <includes>index.xml</includes>
+ <chunkedOutput>true</chunkedOutput>
+ <xincludeSupported>true</xincludeSupported>
+ <foCustomization>src/docbkx/resources/xsl/fopdf.xsl</foCustomization>
+ <htmlCustomization>src/docbkx/resources/xsl/html_chunk.xsl</htmlCustomization>
+ <htmlStylesheet>css/hc-tutorial.css</htmlStylesheet>
+ <entities>
+ <entity>
+ <name>version</name>
+ <value>${pom.version}</value>
+ </entity>
+ </entities>
<postProcess>
<copy todir="target/site/tutorial">
<fileset dir="target/docbkx">

0 comments on commit 20680fe

Please sign in to comment.