{"issue":{"title":"Using up too much memory for peers","milestone":null,"user":{"id":1041375,"login":"SineSwiper","url":"https://api.github.com/users/SineSwiper","avatar_url":"https://secure.gravatar.com/avatar/e2d09531dd04c864d578243656ec4460?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e2d09531dd04c864d578243656ec4460"},"created_at":"2011-12-19T18:22:25Z","labels":[],"state":"open","updated_at":"2011-12-19T18:22:25Z","id":2603736,"html_url":"https://github.com/rakshasa/libtorrent/issues/5","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":null,"body":"The libtorrent/rTorrent suite is still using too much memory when faced with a moderate amount of torrents and peers.  After something like 500 total connections, it reaches around 3GB of RAM.  Compared to uTorrent using at most 200MB of RAM for the same situation.\r\n\r\nBased on what little I can parse from the C++ code, it appears that libtorrent is still allocating a chunk's worth of memory per peer.  There's really no need to allocate the memory as soon as the peer is connected, especially since most peers just sit there and don't do anything.  It should only allocate the memory when the peer is actually transferring data.  If the chunk isn't useful as a cache hit, then the memory should be de-allocated when the peer isn't talking again.","number":5,"url":"https://api.github.com/repos/rakshasa/libtorrent/issues/5","comments":0,"assignee":null},"action":"opened"}