[Sugar-devel] Browse cache bloat

Rafael Ortiz rafael at activitycentral.com
Fri May 20 13:14:18 EDT 2011


On Fri, May 20, 2011 at 9:32 AM, Sebastian Silva
<sebastian at somosazucar.org>wrote:

>  Here's the patch until now. This avoids a growing instance dir except for
> the case when the machine or browse crash.
> Its not the cache but the partial downloads that fill up the disk
> (generally firefox saves these partial downloads in the filesystem along
> with the download. Browse puts these in this temporary directory before
> transferring them to the journal.
>
> I think its safe to assume if we are the only instance of Browse and there
> are partial downloads in the instance dir, we should remove them.
> I'm trying to figure out how to check for this condition.
>
> Regards,
> Sebastian
>
>
I did a change to the patch but it's o.k, other corner case that I
encountered is when there
are already .part files in the /instance directory,
these should be erased when browse starts.




> El 20/05/11 08:56, Gonzalo Odiard escribió:
>
> Part of the problem is the user does not know nothing about the existence
> of this files.
>
> Gonzalo
>
> On Fri, May 20, 2011 at 9:51 AM, Walter Bender <walter.bender at gmail.com>wrote:
>
>>
>>
>>  On Fri, May 20, 2011 at 1:24 AM, Sebastian Silva <
>> sebastian at somosazucar.org> wrote:
>>
>>>   I've implemented the first part of this patch.
>>> It deletes partial downloads when user clicks on cancel button or deletes
>>> journal download entry.
>>> This should already mitigate thie situation. Alas, the partial download
>>> still remains when there is a crash.
>>>
>>> I could remove partial downloads on start of activity, but i'm worried
>>> another instance of Browse might be open and downloading.
>>> How should I check for this condition?
>>>
>>> Thanks
>>> Sebastian
>>>
>>> El 19/05/11 20:20, Sebastian Silva escribió:
>>>
>>> Hi,
>>> dirakx and I are working on Browse and are trying to find a way to fix
>>> http://bugs.sugarlabs.org/ticket/2659 - [dx2] Browse should have a cache
>>> cleaning policy
>>>
>>> It seems to us the only way to bloat the
>>> .sugar/default/org.laptop.WebActivity/instance dir is by doing a large
>>> download and then interrupting it (either because of network problems or by
>>> canceling). This leaves partial downloads in this dir and can fill the disk
>>> pretty quickly on XO hardware.
>>>
>>> We have thought of a workaround policy as we can't find an option in
>>> xulrunner to handle this by removing these partial files:
>>>     - on click of "cancel" in a download - erase partial download
>>>     - on start of new session of browse (if no other instance is running)
>>>
>>> Is this an acceptable fix?
>>> Input welcome as we prepare the patch,
>>>
>>> Cheers,
>>> Sebastian
>>>
>>>
>>>
>>>  _______________________________________________
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>>
>> Why not have a button for clearing the cache regardless of the
>> circumstances by which it filled? As to where to put the button...
>>
>> -walter
>>
>> --
>> Walter Bender
>> Sugar Labs
>> http://www.sugarlabs.org
>>
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110520/72aae51e/attachment.html>


More information about the Sugar-devel mailing list