Saturday, February 17, 2007

MonoTorrent news:

MonoTorrent has gotten increasingly stable as time has gone on. I found the cause of a few long running bugs which have now been crushed into tiny tiny pieces. There shouldn't be any more ArgumentExceptions being thrown due to passing the wrong IAsyncResult into an End*** method. That was caused be me forgetting to clear out the Download/Upload queue when a peer is disconnected.

uPnP support has been enabled in MonoTorrent using Mono.Nat. So all you people with uPnP routers no longer have to worry about manually creating the port mapping in your router. It'll all be done automagically (all going well ;) ).

Disk writes are now fully asynchronous, but now will automatically throttle download speed if you are downloading faster than your harddisk can write. So you won't ever get 100s of megs of ram being used and 100% cpu usage when exceeding your write speed.

Upload and download speed calculations have been improved drastically (ish) for torrents. What i did before was calculate each individual peers upload and download speed, then sum up that for all connected peers to see a torrents overall download rate.

While this worked, it meant that any errors in calculation for each individual peer got magnified resulting in a fairly inaccurate overall download speed in certain situations. The quick solution was to give the Torrent it's own dedicated ConnectionManager.

There've been a few other minor changes here and there including enhancing download performance. All in all, some good stuff.

3 comments:

Unknown said...

Looking good, Although UPnP crashs here on the INatDevice.Start() line. Windows Vista with bundled .NET Framework.

Alan said...

Hi,

Unfortunately that's a problem with vista. I can't fix it because i don't have a vista install, but it seems to be an incompatibility with either vista itself or a bug in the .net framework version bundled with vista. The line it crashes on is one that shouldn't be possible to crash on :p

There's two people with vista install s who've reported that to me via email, so hopefully i'll get a fix for it soon from one of them.

Unknown said...

Gotcha, Disabled UPnP here for the time being, I don't use it anyhow.
As I've told you by email, I'm slowly building a Windows GUI for MonoTorrent, So I'll be testing any changes you make here and there :)

Hit Counter