[icedtea-web] RFC: Use timeouts for checking if cache is fresh

Andrew Azores aazores at redhat.com
Mon May 5 15:30:49 UTC 2014


On 05/02/2014 05:06 PM, Omair Majid wrote:
> Hi,
>
> IcedTea-Web tries to check that the cached content is up-to-date by
> connecting to the server and doing HEAD requests. The problem is, some
> servers are too slow and checking that the cache is indeed up-to-date
> takes a very long time. One particular server was taking about 7 seconds
> to respond to each request, just to tell us that the cache was indeed
> up-to-date.
>
> The attached patch adds some basic (and I suspect incomplete) timeout
> functionality. IcedTea-Web will assume the cache is up-to-date if the
> server doesn't reply in a second or so. This significantly speeds up
> running cached applications.
>
> The proprietary javaws does something similar, as indicated at:
> http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/enhancements6.html
>
> Thoughts?
>
> Thanks,
> Omair
>

Do you have any publicly accessible test case for this? I'm not sure if 
slow starting is due to the timeout not working or if it's working and 
the connection is established in a timely fashion but takes a long time 
to consume. Would the SocketTimeoutException be logged if raised, at 
least at debug level?

The code itself looks okay to me but I'm not too familiar with this part 
of the codebase. I think Jiri probably knows more.

Thanks,

-- 
Andrew A



More information about the distro-pkg-dev mailing list