Shareaza hanging frequently while downloading

Post comments about Shareaza code and discuss with other developers.
Forum rules
Home | Wiki | Rules

Shareaza hanging frequently while downloading

Postby old_death » 05 Jun 2011 23:40

I have been downloading a large torrent today (several GBs). During doing so, I have noticed what might be the reason for the Shareaza GUI hanging so frequently while heavily downloading: Everything was fine until I started to move some 400 GB from one drive to an other. Afterwards, it was fine again, too.

This is why I suspect the hanging comes from Shareaza requesting read/write accesses on the HDD and waiting for them. Like this, some thread(s) necessary for GUI refreshing is (are) locked until a read/write access is granted - freezing the GUI meanwhile.

The reason why the problems are bigger with BitTorrents than with other files of similar size is that torrents are splitted into much more small fragments while downloading; fragments that need to be written on different places of the disk - and thus requiring more read/write accesses to be granted.

Maybe we should implement download caching of some sort to reduce the number of read/write accesses necessary. Shareaza would store newly downloaded data in RAM and only synchronize with the files on disk each - for example - 20 seconds.

EDIT: Moved to development forum... thought it might be better located there...
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Shareaza hanging frequently while downloading

Postby ailurophobe » 06 Jun 2011 01:32

Like Downloads.SaveInterval (default 60s) or Downloads.BufferSize (default 80kB)?

Maybe the issue is that it flushes all buffers every 60 seconds instead of each buffer after 60 seconds? That would be easy to code and it would pretty much cause the problem you describe. Since you have Visual Studio maybe you could check?

You can try increasing save interval. That should make Shareaza use fewer and larger disk transactions.
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Shareaza hanging frequently while downloading

Postby old_death » 06 Jun 2011 16:14

At the moment, I am unable to debug Shareaza, because of Ryo's pre v2.5.5.0 compiling changes, which make important debug information files not being compatible with my system. Until this has changed, I'm sorry but I am unable to efficiently code on Shareaza...
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Shareaza hanging frequently while downloading

Postby ailurophobe » 07 Jun 2011 01:03

Really, I thought he fixed it already. Must have been some other project file update...
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Shareaza hanging frequently while downloading

Postby old_death » 07 Jun 2011 23:21

No, it was that VS2010 compile change update. It builds but prevents me from debugging the code...
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19


Return to Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron