5 Oct 01:37
5 Oct 01:44
Re: files over tubes
Erik Blankinship <erikb <at> mediamods.com>
2007-10-04 23:44:59 GMT
2007-10-04 23:44:59 GMT
Erik Blankinship wrote:
> It is not clear to me how I would send a large pdf file using tubes.
How large? Large enough that you wouldn't want to store the whole thing in memory?
Yes.
_______________________________________________ Sugar mailing list Sugar <at> lists.laptop.org http://lists.laptop.org/listinfo/sugar
8 Oct 16:06
Re: files over tubes
Morgan Collett <morgan.collett <at> collabora.co.uk>
2007-10-08 14:06:49 GMT
2007-10-08 14:06:49 GMT
Erik Blankinship wrote: > > Erik Blankinship wrote: > > It is not clear to me how I would send a large pdf file using tubes. > > How large? Large enough that you wouldn't want to store the whole > thing in memory? > > > Yes. I attached an (untested, incomplete) patch for HelloMesh to https://dev.laptop.org/ticket/4051 as a suggestion. Let me know if you get stuck. Regards Morgan
12 Oct 07:03
Re: files over tubes
Muriel de Souza Godoi <muriel <at> laptop.org>
2007-10-12 05:03:48 GMT
2007-10-12 05:03:48 GMT
Thank you for the code!
I could use that methods with success in Memorize, was just needed some specific changes.
Maybe there is a isolated problem in number chunks value, which should be round up in order to send the entire file.
Concerning about chunk size, I tested with success the value 4096. That speed up the transfer time.
There is a best value for chunk size?
On 10/8/07,
Morgan Collett <morgan.collett <at> collabora.co.uk> wrote:
Erik Blankinship wrote:
>
> Erik Blankinship wrote:
> > It is not clear to me how I would send a large pdf file using tubes.
>
> How large? Large enough that you wouldn't want to store the whole
> thing in memory?
>
>
> Yes.
I attached an (untested, incomplete) patch for HelloMesh to
https://dev.laptop.org/ticket/4051 as a suggestion.
Let me know if you get stuck.
Regards
Morgan
_______________________________________________
Sugar mailing list
Sugar <at> lists.laptop.org
http://lists.laptop.org/listinfo/sugar
--
Muriel de Souza Godoi
muriel <at> laptop.org
Intern Developer
One Laptop Per Child
_______________________________________________ Sugar mailing list Sugar <at> lists.laptop.org http://lists.laptop.org/listinfo/sugar
12 Oct 11:12
Re: files over tubes
Morgan Collett <morgan.collett <at> collabora.co.uk>
2007-10-12 09:12:15 GMT
2007-10-12 09:12:15 GMT
Muriel de Souza Godoi wrote: > Thank you for the code! > I could use that methods with success in Memorize, was just needed some > specific changes. > > Maybe there is a isolated problem in number chunks value, which should > be round up in order to send the entire file. Yes, could be, I didn't test it completely. > Concerning about chunk size, I tested with success the value 4096. That > speed up the transfer time. > There is a best value for chunk size? Erik wanted to transfer files that wouldn't necessarily fit in memory. If you are working with files that do fit in memory while running the activity, you can take out the chunk logic and just read in the whole file and send it in one go. Otherwise, you could experiment with larger chunks and see what works. Try both server (gabble) and link local (salut) sharing, they should both support message fragmentation allowing large messages but they may have different limits at the moment. Regards Morgan
12 Oct 15:11
Re: files over tubes
Erik Blankinship <erikb <at> mediamods.com>
2007-10-12 13:11:14 GMT
2007-10-12 13:11:14 GMT
> Maybe there is a isolated problem in number chunks value, which should
> be round up in order to send the entire file.
Yes, could be, I didn't test it completely.
"""Send a file over the D-Bus Tube"""
size = os.path.getsize(filename)
f = open(filename)
chunk_size = 1000
chunks = size / chunk_size
if (size%chunk_size != 0):
chunks += 1
_______________________________________________ Sugar mailing list Sugar <at> lists.laptop.org http://lists.laptop.org/listinfo/sugar
12 Oct 15:11
[sugar] files over tubes
Erik Blankinship <erikb <at> mediamods.com>
2007-10-12 13:11:14 GMT
2007-10-12 13:11:14 GMT
> > Maybe there is a isolated problem in number chunks value, which should
> > be round up in order to send the entire file.
>
> Yes, could be, I didn't test it completely.
"""Send a file over the D-Bus Tube"""
size = os.path.getsize(filename)
f = open(filename)
chunk_size = 1000
chunks = size / chunk_size
if (size%chunk_size != 0):
chunks += 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20071012/427ec5a7/attachment.htm
12 Oct 11:12
[sugar] files over tubes
Morgan Collett <morgan.collett <at> collabora.co.uk>
2007-10-12 09:12:15 GMT
2007-10-12 09:12:15 GMT
Muriel de Souza Godoi wrote: > Thank you for the code! > I could use that methods with success in Memorize, was just needed some > specific changes. > > Maybe there is a isolated problem in number chunks value, which should > be round up in order to send the entire file. Yes, could be, I didn't test it completely. > Concerning about chunk size, I tested with success the value 4096. That > speed up the transfer time. > There is a best value for chunk size? Erik wanted to transfer files that wouldn't necessarily fit in memory. If you are working with files that do fit in memory while running the activity, you can take out the chunk logic and just read in the whole file and send it in one go. Otherwise, you could experiment with larger chunks and see what works. Try both server (gabble) and link local (salut) sharing, they should both support message fragmentation allowing large messages but they may have different limits at the moment. Regards Morgan
12 Oct 07:03
[sugar] files over tubes
Muriel de Souza Godoi <muriel <at> laptop.org>
2007-10-12 05:03:48 GMT
2007-10-12 05:03:48 GMT
Thank you for the code! I could use that methods with success in Memorize, was just needed some specific changes. Maybe there is a isolated problem in number chunks value, which should be round up in order to send the entire file. Concerning about chunk size, I tested with success the value 4096. That speed up the transfer time. There is a best value for chunk size? On 10/8/07, Morgan Collett <morgan.collett at collabora.co.uk> wrote: > > Erik Blankinship wrote: > > > > Erik Blankinship wrote: > > > It is not clear to me how I would send a large pdf file using > tubes. > > > > How large? Large enough that you wouldn't want to store the whole > > thing in memory? > > > > > > Yes. > > I attached an (untested, incomplete) patch for HelloMesh to > https://dev.laptop.org/ticket/4051 as a suggestion. > > Let me know if you get stuck. > > Regards > Morgan > _______________________________________________ > Sugar mailing list > Sugar at lists.laptop.org > http://lists.laptop.org/listinfo/sugar > -- -- Muriel de Souza Godoi muriel at laptop.org Intern Developer One Laptop Per Child -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.laptop.org/pipermail/sugar/attachments/20071012/988428ce/attachment.htm
8 Oct 16:06
[sugar] files over tubes
Morgan Collett <morgan.collett <at> collabora.co.uk>
2007-10-08 14:06:49 GMT
2007-10-08 14:06:49 GMT
Erik Blankinship wrote: > > Erik Blankinship wrote: > > It is not clear to me how I would send a large pdf file using tubes. > > How large? Large enough that you wouldn't want to store the whole > thing in memory? > > > Yes. I attached an (untested, incomplete) patch for HelloMesh to https://dev.laptop.org/ticket/4051 as a suggestion. Let me know if you get stuck. Regards Morgan
5 Oct 01:44
[sugar] files over tubes
Erik Blankinship <erikb <at> mediamods.com>
2007-10-04 23:44:59 GMT
2007-10-04 23:44:59 GMT
> Erik Blankinship wrote: > > It is not clear to me how I would send a large pdf file using tubes. > > How large? Large enough that you wouldn't want to store the whole thing in > memory? Yes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.laptop.org/pipermail/sugar/attachments/20071004/9eef178a/attachment.htm
RSS Feed