Review Request 128283: Add checksums tab to the properties dialog

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sat Jun 25 12:54:18 UTC 2016



> On June 25, 2016, 11:35 a.m., Christoph Feck wrote:
> > I wished it was for the KIO overwrite dialog ;)
> > 
> > Anyway, reading the file three times without the user asking for the checksums is a recipe for disk cache draining.
> > 
> > I suggest to compute all checksums in parallel, i.e. read the file only once, and only do it when the user selects the Checksum tab.

I'm not sure where I'm reading the file from disk more than once. There is only one `file.readAll()` in the constructor. Maybe when the file doesn't fit in ram and reading (later) from `buffer` implies reading from the disk swap?


- Elvis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128283/#review96858
-----------------------------------------------------------


On June 25, 2016, 10:39 a.m., Elvis Angelaccio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128283/
> -----------------------------------------------------------
> 
> (Updated June 25, 2016, 10:39 a.m.)
> 
> 
> Review request for KDE Frameworks, KDE Usability and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> This patch adds a Checksums tab in the properties dialog, where the user can retrieve and verify the most popular checksum algorithms (md5, sha1 and sha256). 
> 
> To simplify the implementation, the checksums are computed as soon as the user opens the dialog. This can take a while if the file is huge (in particular with sha256), but the computation happens in another thread and in practice this should not be a performance problem.
> 
> The tab is available only for readable local files (no simlinks) and only when there is a single selection.
> 
> Please note that some of the labels in the screenshots are clipped due to a bug in breeze: https://bugs.kde.org/show_bug.cgi?id=364426
> 
> 
> Diffs
> -----
> 
>   src/widgets/CMakeLists.txt f9065777a0d2f1d126dc482d66e1bbb1ba127895 
>   src/widgets/checksumswidget.ui PRE-CREATION 
>   src/widgets/kpropertiesdialog.cpp d0a2faa5114e391680925e10646ce7c6f2ea29da 
>   src/widgets/kpropertiesdialog_p.h c01554e694ff3c905e768048ce94800739760fb7 
> 
> Diff: https://git.reviewboard.kde.org/r/128283/diff/
> 
> 
> Testing
> -------
> 
> * Check whether the computed values match the values from md5sum, sha1sum, sha256sum.
> * Check whether the line edits get a green background if the computed and expected values match.
> * Check whether the line edits get a red background if the computed and expected values differ.
> 
> 
> File Attachments
> ----------------
> 
> sha256-computing
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/25/327218af-c026-458e-a48d-512787abad42__Spectacle.st2415.png
> md5-match
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/25/4b37d28e-02b9-42e2-96f2-184ffd42b31a__Spectacle.kh2415.png
> sha1-differ
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/25/99fdcf92-f784-4a7d-8aba-c25b8be08c04__Spectacle.Xz2415.png
> 
> 
> Thanks,
> 
> Elvis Angelaccio
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160625/7cd59b07/attachment.html>


More information about the Kde-frameworks-devel mailing list