<br><br><div class="gmail_quote">On Fri, May 20, 2011 at 12:14 PM, Rafael Ortiz <span dir="ltr"><<a href="mailto:rafael@activitycentral.com">rafael@activitycentral.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Fri, May 20, 2011 at 9:32 AM, Sebastian Silva <span dir="ltr"><<a href="mailto:sebastian@somosazucar.org" target="_blank">sebastian@somosazucar.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">
Here's the patch until now. This avoids a growing instance dir
except for the case when the machine or browse crash.<br>
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. <br>
<br>
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.<br>
I'm trying to figure out how to check for this condition.<br>
<br>
Regards,<br>
Sebastian<br>
<br></div></blockquote><div><br></div></div><div>I did a change to the patch but it's o.k, </div></div></blockquote><div><br></div><div>attaching patch, </div><div><br></div><div>Tested downloading a .iso and watch /istance</div>
<div>grows and then browse erasing .part after download is cancelled. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">
<div>other corner case that I encountered is when there </div><div>are already .part files in the /instance directory,</div><div>these should be erased when browse starts. </div><div><div></div><div class="h5">
<div><br></div><div><br></div></div></div></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div><div class="h5">
<div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#ffffff" text="#000000">
El 20/05/11 08:56, Gonzalo Odiard escribió:
<div><div></div><div><blockquote type="cite">Part of the problem is the user does not know nothing
about the existence of this files.<br>
<br>
Gonzalo<br>
<br>
<div class="gmail_quote">On Fri, May 20, 2011 at 9:51 AM, Walter
Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><br>
<br>
<div class="gmail_quote">
<div>
<div>On Fri, May 20, 2011 at 1:24 AM, Sebastian
Silva <span dir="ltr"><<a href="mailto:sebastian@somosazucar.org" target="_blank">sebastian@somosazucar.org</a>></span>
wrote:<br>
</div>
</div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>
<div>
<div bgcolor="#ffffff" text="#000000"> I've
implemented the first part of this patch.<br>
It deletes partial downloads when user clicks on
cancel button or deletes journal download entry.<br>
This should already mitigate thie situation. Alas,
the partial download still remains when there is a
crash. <br>
<br>
I could remove partial downloads on start of
activity, but i'm worried another instance of Browse
might be open and downloading.<br>
How should I check for this condition?<br>
<br>
Thanks<br>
Sebastian<br>
<br>
El 19/05/11 20:20, Sebastian Silva escribió:
<div>
<div>
<blockquote type="cite"> Hi,<br>
dirakx and I are working on Browse and are
trying to find a way to fix <br>
<a href="http://bugs.sugarlabs.org/ticket/2659" target="_blank">http://bugs.sugarlabs.org/ticket/2659</a>
- [dx2] Browse should have a cache cleaning
policy<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;font-size:14px"></span></span><br>
<br>
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.<br>
<br>
We have thought of a workaround policy as we
can't find an option in xulrunner to handle
this by removing these partial files:<br>
- on click of "cancel" in a download -
erase partial download<br>
- on start of new session of browse (if no
other instance is running)<br>
<br>
Is this an acceptable fix?<br>
Input welcome as we prepare the patch,<br>
<br>
Cheers,<br>
Sebastian<br>
</blockquote>
<br>
</div>
</div>
</div>
<br>
</div>
</div>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br>
</blockquote>
</div>
<br>
Why not have a button for clearing the cache regardless of the
circumstances by which it filled? As to where to put the
button...<br>
<br>
-walter<br clear="all">
<font color="#888888"><br>
-- <br>
Walter Bender<br>
Sugar Labs<br>
<a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
<br>
</font><br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div></div></div><br>
</blockquote></div><br>