pnever 2003/11/14 01:36:59
Modified: src/webdav/server/org/apache/slide/webdav/util
VersioningHelper.java
Log:
Thanks to Nick Redel [EMAIL PROTECTED]:
"I�m developing a client application based on webdav, using Slide as the
server, which is accessing large collections (in the thousands), and I'm
running into problems with the time Slide takes to execute a PROPFIND on
large collections .
One thing I noticed in the PROPFIND method is that ~30% of the total
method time is taken in the call to <getLabeledResourceUri> in
<VersioningHelper>, since the helper class retrieves all the node
descriptors (including their properties) from the store - so in fact the
revisions are retrieved from the store 2 or 3 times rather than once.
Anyway, the following patch on <VersioningHelper> improves the response
time of PROPFIND by 20-30%. The assumption is that the URI of the latest
version of a resource is the URI itself, in all cases (I think this is
true, from the code, and it works)."
Revision Changes Path
1.93 +10 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
Index: VersioningHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- VersioningHelper.java 5 Nov 2003 14:24:35 -0000 1.92
+++ VersioningHelper.java 14 Nov 2003 09:36:59 -0000 1.93
@@ -231,7 +231,12 @@
* label was found.
*/
public String getLabeledResourceUri(String resourcePath, String label) throws
SlideException, LabeledRevisionNotFoundException {
- return getLabeledResourceUri(nsaToken, sToken, content, resourcePath,
label);
+ if (label == null) {
+ return resourcePath;
+ }
+ else {
+ return getLabeledResourceUri(nsaToken, sToken, content, resourcePath,
label);
+ }
}
/**
@@ -1936,7 +1941,7 @@
* @throws LabeledRevisionNotFoundException if no revision with the
specified
* label was found.
*/
- public static String getLabeledResourceUri(NamespaceAccessToken nsaToken,
SlideToken sToken, Content content, String resourcePath, String label) throws
SlideException, LabeledRevisionNotFoundException {
+ private static String getLabeledResourceUri(NamespaceAccessToken nsaToken,
SlideToken sToken, Content content, String resourcePath, String label) throws
SlideException, LabeledRevisionNotFoundException {
NodeRevisionDescriptors revisionDescriptors =
content.retrieve( sToken, resourcePath );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]