You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2000/11/17 18:13:17 UTC

Slide performance change

What do you think about following change. To my understanding it would make
the code a bit faster and should have no side effects (if I have not missed
something):

            InputStream is = null;
	if (printContent) {
		is = content.retrieve(credToken, revisionDescriptors,
                                   revisionDescriptor).streamContent();
                        }

in the method GetMethod.executeRequest()

To my understanding the local field "is"  is only used if the "printContent"
is set to true?

Best regards

Juergen Pill
					}

 -----Original Message-----
From: 	Pill, Juergen [mailto:Juergen.Pill@softwareag.com] 
Sent:	Friday, November 17, 2000 4:07 PM
To:	'slide-user@jakarta.apache.org'
Subject:	Timing output in Slide

What do you think about following change?

Slide is able to print for each request the consumed time.

I had to do following changes in my local copy of Slide:

1) add following code to the WebDavServlet. . service method
		Date startTime = new Date();      // at the very beginng of
the method
        Domain.info(				// at the very end of the
method
						   " (time: " + (new
Date().getTime() - startTime.getTime()) + " ms)" +
						   " - "
                          + req.getMethod() + " on object " +
WebdavMethod.getRelativePath(req));
2) remove println from the constructor of WebdavMethod
3)     public static String getRelativePath(HttpServletRequest request)  //
is now static and public, to be called from WebDavServlet


This would produce following output:

Fri, 17 Nov 2000 15:56:52 GMT+01:00 - default - INFO -  (time: 266 ms) -
PROPFIND on object /files
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Checking basic
permissions on new object
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Basic permissions
granted for user 
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 16 ms) -
MKCOL on object /files/binaries
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 0 ms) -
PROPFIND on object /files/binaries
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 31 ms) - HEAD
on object
/files/binaries/DO%20NOT%20PUT%20AN%20INDEX%20FILE%20IN%20THIS%20DIR
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Checking basic
permissions on new object
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Basic permissions
granted for user 
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 47 ms) - PUT
on object
/files/binaries/DO%20NOT%20PUT%20AN%20INDEX%20FILE%20IN%20THIS%20DIR
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 16 ms) - HEAD
on object
/files/binaries/DO%20NOT%20PUT%20AN%20INDEX%20FILE%20IN%20THIS%20DIR
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 16 ms) - PUT
on object
/files/binaries/DO%20NOT%20PUT%20AN%20INDEX%20FILE%20IN%20THIS%20DIR
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 16 ms) - HEAD
on object
/files/binaries/DO%20NOT%20PUT%20AN%20INDEX%20FILE%20IN%20THIS%20DIR
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO -  (time: 0 ms) - HEAD
on object /files/binaries/image1.gif
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Checking basic
permissions on new object
Fri, 17 Nov 2000 15:57:10 GMT+01:00 - default - INFO - Basic permissions
granted for user 
Fri, 17 Nov 2000 15:57:11 GMT+01:00 - default - INFO -  (time: 16 ms) - PUT
on object /files/binaries/image1.gif
Fri, 17 Nov 2000 15:57:11 GMT+01:00 - default - INFO -  (time: 0 ms) - HEAD
on object /files/binaries/image1.gif
Fri, 17 Nov 2000 15:57:11 GMT+01:00 - default - INFO -  (time: 31 ms) - PUT
on object /files/binaries/image1.gif
Fri, 17 Nov 2000 15:57:11 GMT+01:00 - default - INFO -  (time: 0 ms) - HEAD
on object /files/binaries/image1.gif

Best regards

Juergen Pill


 -----Original Message-----
From: 	Harding, Christopher (Student Assistant)
[mailto:Christopher.Harding@softwareag.com] 
Sent:	Wednesday, November 01, 2000 4:35 PM
To:	'slide-user@jakarta.apache.org'
Subject:	ObjectNode - tree structure

Hello,
  Can you tell me if this is correct, if not please correct me.

  An SubjectNode with the URI of "/action" is created in the
MemoryDescriptorsStore, this is then stored under the Object hashtable with
the URI "/actions", then the "/" ObjectNode has it's CHILDREN vector updated
with the "/action" (is this a URI or String? not to sure). So when the "/"
ObjectNode is retrieved and displayed in MS Webfolders it's displayed as a
folder.

  If I create a SubjectNode called "/messabout" I would go through the
following steps:-
	Create SubjectNode "/messabout"
	Store SubjectNode "/messabout"
	Add to "/" SubjectNode the child "/messabout"
	Store SubjectNode "/"

  So if I got this correct then "/messabout" is displayed as a folder (as
you get a tree structure from the "/" SubjectNode children"), are these the
correct steps to do this? (Sorry there's no code but I'm still trying to
figure how the stores work). Is there anything in these steps / other steps
that I must do?

  Thank you for any help

  Chris Harding

Re: Slide performance change

Posted by Remy Maucherat <re...@apache.org>.
> What do you think about following change. To my understanding it would
make
> the code a bit faster and should have no side effects (if I have not
missed
> something):
>
>             InputStream is = null;
> if (printContent) {
> is = content.retrieve(credToken, revisionDescriptors,
>                                    revisionDescriptor).streamContent();
>                         }
>
> in the method GetMethod.executeRequest()
>
> To my understanding the local field "is"  is only used if the
"printContent"
> is set to true?

Yes, definitely. That should make HEAD requests faster (IE makes a lot of
them).

Thanks !
Remy