Porting debtorrent to C/C++

Cameron Dale camrdale at gmail.com
Sat Jan 19 07:53:13 UTC 2008


On 1/18/08, Voker57 <voker57 at gmail.com> wrote:
> On Saturday 19 January 2008 08:13:49 Bryan Quigley wrote:
> > I don't know why python couldn't handle the "load" correctly, the original
> > bit torrent is in python.
>
> Do you mean BitTornado? It's known by its memory and CPU greediness as well.

The original "mainline" bittorrent client was also written in python.
Also, I don't think BitTornado is as known for being memory and CPU
intensive as something like Azureus, though I'm sure it uses more than
something like libtorrent.

> > Having said that I turned off debtorrent on my hardy box for now pending an
> > unrelated idling bug[1], but before I got it uninstalled it I was nervous
> > of the 122 Mb of ram it was taking up as this is a desktop system.
>
> That's why it takes so much memory - it's in interpreted language.

FWIW, being an interpreted language is not necessarily the major cause
of the problem. The torrents that DebTorrent has to work with are
quite large due to the number of files in them (probably an order of
magnitude larger than normal .torrent files). These are currently
stored in memory, though I am looking into alternatives. I'm sure
there are plenty of places where optimizations could be made in the
code to save on memory, but due to it being so young still I haven't
had a chance to get to it. There's also a bug in python 2.4 that
causes increased memory usage, which will be reduced when python 2.5
becomes standard.

Thanks,
Cameron



More information about the Debtorrent-devel mailing list