Archive for November, 2009

And another KGet entry

November 9, 2009

There have been some blog posts on KGet and now it is my turn to add another one. 🙂

The last few weeks/months I kept polishing all the changes I did for KGet during GSOC and also introduced new stuff. It is fantastic to see how KGet improved the last few months with all the work we (the KGet team) put into it.

Speeding up downloads

Multisource-Downloading worked and still can work a way that a file is split into segments, then a TransferDataSource is assigned a segment and then downloads it. What that means is that whenever a TransferDataSource finishes the download of a segment it is assigned a different segment and connects again to the server … In fact that is not ideal as connecting to the server takes time, so I changed that.

Now multiple segments e.g. segment 1 to 10 can be assigned to a TransferDataSource, thus the connection is not always closed and recreated once a segment is finished, but only closes once the segment range finished resulting in less resource usage and faster downloads. [1]

Whenever the user decides to use more connections per mirror or when they add another mirror the TransferDataSource that has most undowloaded segments splits the range.

Threads

One of those polishing changes I did was to use threads when creating checksums, like when a download is being verified, or when you create a metalink and chose to automatically create checksums. Now these calls are not blocking anymore and you can control KGet during this kind of operations normally.

I also experimented with OpenMP and optimizing the loading of files when calculating the checksums, though the very small speedup does not justify the changes in the code, so it won’t be there.

Signatures

Other than that I implemented PGP signature checking.

The user has the posibility to enter a signature or in case of a metalink this happens automatically — in fact only if the signature is embed in the metalink. If there is no key for that signature then the user is asked if the key should be searched for. It can even be specified (in the Preferences) in which order the servers should be tried.

Verification preferences

Yes, now all that can be configured. Btw. “Strong” is default.

Ok, so what does it all look like, you may ask? First I changed the transfer settings dialog, to give the user a better overview of what the situation is like for all the files of a transfer, which ones have been verified etc.

[2]

The verification dialog now shows which checksums have been verified (in the screenshot I used the “Strongest” option):

Enough talking about side aspects, here is the signature-dialog. I tried to use icons where feasable — to help the user find what could be a problem — it will see some improvments in the following weeks, though I think it is in a releasable state already.

In fact the newly added keys will also appear in KGpg or Kleopatra or any other program using gpg one way or the other, as I’m using gpgme++, btw. thanks to the everyone who worked on gpgme++ makes life way easier than gpgme [3] and thanks to the people who helped me on the ml.

Before you ask so far I do not plan to add support for decrypting, imo you should use other tools for that than a download program.

Bugs

I also fixed some bugs, now that annoying one where the details of transfers would still be shown even if they were (re)moved is finally gone.

Lukas also worked a lot on KGet like changing the basic model that is used in the view etc. (up to him to blog about that 😉 ) and Dario tracked down some rare crashes via using QTests.

On Bugs, if you find some in trunk please report them so that we can fix them before 4.4.

Conclusio

All in all I have the feeling that the next KGet release (with KDE 4.4) will be a great one. That also means that you are encouraged to test KGet from trunk and report bugs and that I’m encouraged to try fixing them in the weeks to follow. 🙂

PS.: This blog post has been in the work for quite a while, but rl caught up,

[1] Thanks to the people on #kde-devel who discussed with me on this issue! And thanks in general for all the help you gave me on the several #kde channels. 🙂

[2] Btw. do you know an easy way to find a good size for a dialog? E.g. all columns in a view should not be smaller than their prefered size, when there is enough space the dialog should expand to show everything –> the dialog you see in the screenshot has been manually resized by me, otherwise it would not look that way.

[3] In search of what I thought was a bug I reprogrammed large parts with gpgme (yummy, error handling with c-libs *turns crazy*), later on it turned out that I just misunderstood something. Meh!

Advertisements