[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpath-inetlib] Query about slow HTTP HEAD requests
From: |
Chris Burdess |
Subject: |
Re: [Classpath-inetlib] Query about slow HTTP HEAD requests |
Date: |
Mon, 20 Jun 2005 19:12:13 +0100 |
User-agent: |
Mutt/1.3.28i |
Kevin Rogers wrote:
> I'm slowly developing a virtual file system library in Java for
> MillScript(http://www.millscript.org) and have recently switched over
> to release 1.1 of inetlib. In general I've had a good experience of
> the conversion except for one issue regarding HTTP HEAD requests.
>
> I'm trying to implement support for the HTTP protocol within the VFS,
> but in order to achieve this I have to determine if a resource is
> available and if it represents a file or directory. I chose to do this
> by issuing HEAD requests to avoid retrieving any body content
> unnecessarily.
>
> On switching to inetlib I saw a significant increase in the time taken
> to run my basic VFS test suite for the HTTP protocol. The test issues
> around 9 HEAD requests and it now takes 135 seconds to complete, where
> it previously would have taken 10 or less seconds.
>
> I've had a quick look through the code and think the problem lies in
> the readResponseBody method of the Request class. It looks like the
> method is trying to read and body content, even for the HEAD request.
> As a result it appears the HEAD requests from my VFS are waiting for
> the read to timeout each time.
Yes, it looks like this was an oversight on my part.
A correction for this problem is now in CVS HEAD.
--
Chris Burdess