[rfc] [icedtea-web] enable process-wide caching on windows
Alex Kashchenko
akashche at redhat.com
Thu Sep 6 12:17:10 UTC 2018
On 09/06/2018 11:13 AM, Jiri Vanek wrote:
> On 09/06/2018 12:30 AM, Alex Kashchenko wrote:
>> On 09/05/2018 02:42 PM, Jiri Vanek wrote:
>>> On 09/05/2018 12:01 AM, Alex Kashchenko wrote:
>>>> Hi,
>>>>
>>>> This patch enables caching of downloaded JARs on windows. Caching is
>>>> only process-wide - multiple instances of WebStart apps downloading
>>>> JARs simultaneously may break caching logic. It still seems to be
>>>> better than no caching at all:
>>> Thats deffinitley true.
>>>>
>>>> http://cr.openjdk.java.net/~akasko/itw/windows_cache.patch
>>>>
>>> The patch looks good, I'm just wondering, can it be done in more
>>> readable way?
>>
>> It adds as minimal changes as possible.
>>
>>
>>> Eg having WindowsLockedFile extending LockedFile or simialrly?
>>
>> It can be done, but may be non-trivial (OS-wide named mutex looks like
>> an ideal solution for that, but it cannot be accessed in pure java). I
>> have no plans to work on this myself.
>
> No. No more then workround is necessary here, and no more work is
> deffinitly implied on you yourself.
>
> My issue is, that now two completely unrleated things are mixed in the
> conditions.
>
> Myabe to have two bigger sections of
>
> isWindwos then
> else
>
> would be more readable? What do you think?
>
> The WindowsLockedFile would actually do the same, but should spare the
> likely appearing dupcode.
> As the LockedFile already is factory-created, then the WindowsLockedFile
> inner class of WindowsLocked would be really small change.
>
>
> How do you feel abbout attached approach? ***!!!not tested!!!***
I can suggest to test this first, because caching logic there is quite
convoluted.
Minimal patch was tested some months ago before its inclusion with MSI,
I think it is better to push it instead.
--
-Alex
More information about the distro-pkg-dev
mailing list