Antifrag
Moderator: Moderators
Antifrag
That's nice feature , but...
I feel a little bit uncomfortable with it, knowing that "If DC++ crashes, you'll lose the whole downloaded part + any resumed part as well, as
there's no way to know how much valid data there is in the file."
Wouldn't it be possible to make something like "advanced smart-antifrag" or whatever, which would know where I finished downloading?
??
I feel a little bit uncomfortable with it, knowing that "If DC++ crashes, you'll lose the whole downloaded part + any resumed part as well, as
there's no way to know how much valid data there is in the file."
Wouldn't it be possible to make something like "advanced smart-antifrag" or whatever, which would know where I finished downloading?
??
"Blessed is he who expects nothing,
for he shall never be disappointed."
for he shall never be disappointed."
it'd be possible to add a downloadedBytes attribute to the queue item, and save the queue every couple of minutes, yes..
perhaps someone is willing to build that.. don't know really.. you could always use a good filesystem with better anti-fragmentation features (I think ntfs spreads its files pretty neatly, in constrast to FAT) and disable the option altogether
perhaps someone is willing to build that.. don't know really.. you could always use a good filesystem with better anti-fragmentation features (I think ntfs spreads its files pretty neatly, in constrast to FAT) and disable the option altogether
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
Maybe someday I'll switch to NTFS...
It could update itself every time buffer is flushed to disk - so no reading of the filesize would be necessary (because WriteBufferSize is constant, isn't it?).
That will be nice if s o m e o n e adds it. :]
Thank You in advance.
It could update itself every time buffer is flushed to disk - so no reading of the filesize would be necessary (because WriteBufferSize is constant, isn't it?).
That will be nice if s o m e o n e adds it. :]
Thank You in advance.
"Blessed is he who expects nothing,
for he shall never be disappointed."
for he shall never be disappointed."
Not in this patch, maybee a later one. Don't even know if this one will make it to DC++ source... But it's an easy thing to add now if anyone's up for it. =) The patch will be up at http://www.lowertech.net/dcpppatch later today.
Hey distiller,
I was looking at doing a patch to show downloded size in the queue manager, however I am alittle confused about your code. I presumed I could call
+ int64_t getDownloadedBytes() { return downloadedBytes; };
on any Queueitem to get its downloaded size, however this returns a really weird value (I'm guessing cos the variable was never initialized) so I set it to 0 in the two constructers now
QueueItem(const string& aTarget, int64_t aSize, Priority aPriority, bool aResume) : downloadedBytes(0), ....
but now all it returns is 0. I traced it and it does set the downloaded Bytes correctly from the queue.xml. Are these queueitems not the same objects as the ones you set in the first place, or am I missing something here?.
Anyone got some ideas as I'm sure most people feel this would be a nice addition to dc++ (anyone else made the patch already?)
I was looking at doing a patch to show downloded size in the queue manager, however I am alittle confused about your code. I presumed I could call
+ int64_t getDownloadedBytes() { return downloadedBytes; };
on any Queueitem to get its downloaded size, however this returns a really weird value (I'm guessing cos the variable was never initialized) so I set it to 0 in the two constructers now
QueueItem(const string& aTarget, int64_t aSize, Priority aPriority, bool aResume) : downloadedBytes(0), ....
but now all it returns is 0. I traced it and it does set the downloaded Bytes correctly from the queue.xml. Are these queueitems not the same objects as the ones you set in the first place, or am I missing something here?.
Anyone got some ideas as I'm sure most people feel this would be a nice addition to dc++ (anyone else made the patch already?)
Oh, that sounds weird... Will look into it, the patch isn't very good so far either, it behaves incorrectly sometimes. I'll clean it up for you and make sure that function works as well. Then you could add the % completed for me in the queue. =)
By the way, I think you're trying to get the value in some window-manager, the queue-displayer or what it's called? (I'm at work, no source here) I had that problem when trying to make a different patch... The returned value was always 0 even though the correct valyue was stored in the variable. Anyone know something about that?
By the way, I think you're trying to get the value in some window-manager, the queue-displayer or what it's called? (I'm at work, no source here) I had that problem when trying to make a different patch... The returned value was always 0 even though the correct valyue was stored in the variable. Anyone know something about that?
The patch originally worked fine regarding the saving of progress to queue.xml and loading that at start and resuming at the correct position. It only failed when that initial connection dropped and a new user/(doanload object) was created. My bad. But it should've worked so far at least with your project.
I've fixed the patch now, it resumes correctly at all times, haven't found any bugs sofar. The page mentioned above works, it patched against 0.301. There's a debug executable to download, so try it out. Don't forget to enable antifrag in advanced settings.
Any files you may have in queue will restart from 0!
Any files you may have in queue will restart from 0!
http://twink.orcon.net.nz/downloaded.png for what progress I've made on this (yes I removed the filenames from the image) seems to show great potential.
(Edit: url fix - GargoyleMT)
(Edit: url fix - GargoyleMT)
-
- Posts: 6
- Joined: 2003-10-09 02:42
- Location: Miami Florida USA
Re: Antifrag
If you really want to use the feature, copy and paste the data already downloaded to another location. Re-save at regular intervals to keep it current.Garet Jax wrote:That's nice feature , but...
I feel a little bit uncomfortable with it, knowing that "If DC++ crashes, you'll lose the whole downloaded part + any resumed part as well, as
there's no way to know how much valid data there is in the file."
Wouldn't it be possible to make something like "advanced smart-antifrag" or whatever, which would know where I finished downloading?
??
anyway my patch is at http://twink.orcon.net.nz/patches/queue_downloaded.diff you need distillers patch first thou =D.