[ http://nagoya.apache.org/jira/browse/BEEHIVE-128?page=history ]
Bryan Che updated BEEHIVE-128:
------------------------------
Attachment: urlencode-patch.tar.gz
This is the README included in the patch:
This is a patch that changes Beehive from using the
java.net.URLEncoder/Decoder to org.apache.commons.codec.net.URLCodec for
performance and scalability reasons. The URLCodec in commons codec
performs over 4x faster than the Sun implementation. Additionally, I
have many times found scalability bottlenecks with java.net.URLEncoder
in pages that do a fair amount of encoding. A page with many links
might do this, for example.
I am including a benchmark, CodecTest.java, that demonstrates the
performance difference between the encoding methods. The results are in
CodecTest.results.
At a high level, this patch does several things:
- move commons-codec-1.3.jar from wsm/external just to external so that
netui can access it too
- add a class, org.apache.beehive.netui.util.URLCodec that has static
methods for encoding/decoding. This will allow beehive to easily
switch URLEncoding/decoding implementations by just modifying this
class.
- change Beehive code to use org.apache.beehive.netui.util.URLCodec
instead of the java.net classes
- refactor the code base by moving the classes under
netui/src/util/org/apache/beehive/netui/core into a new module,
netui/src/core/org/apache/beehive/netui/core. I had to do this
in order for the util module not to have any dependencies on other
modules. Otherwise, there would have been circular dependencies with
util referring to classes in other packages and other packages
referring to the URLCodec in util. The classes I moved to core didn't
seem to belong in the util module anyway, since they are in the
org.apache.beehive.netui.core.urls packages and not the
org.apache.beehive.netui.util package
- update build.xml files to refer to the new core jar file
This patch modifies the following files listed in patch.txt:
- wsm/build.xml
- beehive.properties
- netui/src/util/build.xml
- netui/src/pageflow/build.xml
- netui/src/tags-html/build.xml
- netui/src/tags-databinding/build.xml
- netui/ant/build.xml
- netui/ant/netui.properties
- build.xml
- netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
- netui/src/util/org/apache/beehive/netui/core/urls/MutableURI.java
-
netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java
- wsm/drt/build.xml
- netui/src/tags-html/org/apache/beehive/netui/tags/HtmlUtils.java
Additionally, you have to perform the following steps in svn:
- move commons-codec from wsm/external/commons-codec-1.3.jar to
external/commons-codec/commons-codec-1.3.jar
- move the package netui/src/util/org/apache/beehive/netui/core to
netui/src/core/org/apache/beehive/netui/core after you have patched
MutableURI.java
- add netui/src/core/build.xml
- add netui/src/util/org/apache/beehive/netui/util/URLCodec.java
> Switch from java.net.URLEncoder/Decoder to
> org.apache.commons.codec.net.URLCodec for
performance and scalability reasons
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: BEEHIVE-128
> URL: http://nagoya.apache.org/jira/browse/BEEHIVE-128
> Project: Beehive
> Type: Improvement
> Components: NetUI, Web Services (181), Build
> Reporter: Bryan Che
> Attachments: urlencode-patch.tar.gz
>
> java.net.URLEncoder/Decoder is pretty slow and often bottlenecks
> pages/servers that do a fair amount of encoding. We should switch to
> org.apache.commons.codec.net.URLCodec instead, which is much
> faster--especially since Beehive already ships commons-codec. I have a patch
> that does this and will be uploading it shortly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira