[rfc][icedtea-web][itweb-settings] Improve Icedtea-Web cache disk space

Jacob Wisor gitne at gmx.de
Wed Jul 9 19:14:24 UTC 2014


On 07/09/2014 04:18 PM, Andrew Azores wrote:
> On 07/09/2014 08:40 AM, Jacob Wisor wrote:
>> On 07/09/2014 08:21 AM, helpcrypto helpcrypto wrote:
>>> My two cents:KISS
>>
>> Yes, this is what we are trying to accomplish here; KISS for users while
>> giving them the most possible freedom.
>>
>>> Place a textbox and let the user define "maximum cache size" using text. 0 for
>>> no cache.
>>
>> No, this is not user friendly. Although text boxes work almost anywhere they
>> are simply not well suited for every purpose. The most common problem with
>> text boxes is that it is not always clear to the user what to enter or what
>> the format of the data entered should be. So, a text box's value would have to
>> be checked for being a number in this case anyway. The JSpinner does this
>> already. A JSpinner is exactly the right UI component for this purpose.
>>
>>> IMHO: Initial value to 100MB will be fair enough.
>>
>> 100 MB is as arbitrary as any other value. Available disk space, user quota,
>> or 0 are not (from the user's point of view).
>>
>>> Remove the spinner, any other references, values and checks.
>>
>> Why? We want to give users the freedom to chose any value that suites them
>> best. You cannot do this with a JSlider because it imposes predefined
>> arbitrary limits. If a user has a use case for a cache size of say 8 TB then
>> why should anybody or any software limit him to do so?
>>
>> Jacob
>
> I do agree with Jacob here (sorry helpcrypto ;) ), although I think that
> defaulting the value to either disk space or quota might be very odd looking for
> a user - to open the control panel to change the cache size and find some
> gigantic and probably random-appearing number in the cache size.

Right.

> Imposing no limit means that the cache will be limited by the available space anyway, so to
> me it seems that having the box initially checked and the spinner prefilled with
> available space is just a more confusing version of having the box unchecked by
> default. Then if the user chooses to check the box and limit the cache size, if
> it defaults to 0 (none), I think this is a sane default to start with, too.

Yep, I may have not made myself clear enough previously but this is what I have 
actually meant too. The check box should not be set by default, hence no limit 
by default. ;-)

> Although I am still working with Lukasz on a better UI for this than having
> arbitrary steps of 32, and it probably would be better to use Long.MAX_VALUE as
> the upper bound than just 1024 or any other arbitrary limit. Anyway, even if the
> user sets the value on the spinner to a number greater than what is actually
> available, that's fine IMO. If they have only 1GB free on their disk and try to
> set 10GB of cache space, well, why isn't that okay? Maybe they're using LVM or
> have unallocated space and are about to expand this partition.

Yes, it is perfectly acceptable to allow setting cache sizes greater than the 
available disk space in the cache directory. Perhaps a warning should be issued 
in the log in this situation?

Jacob


More information about the distro-pkg-dev mailing list