https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&feed=atom&action=history
KDE Utils/kwallet/Benchmark - Revision history
2024-03-28T13:50:19Z
Revision history for this page on the wiki
MediaWiki 1.40.2
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61730&oldid=prev
Ochurlaud: 5 revisions imported: imported from techbase
2016-04-15T10:27:24Z
<p>5 revisions imported: imported from techbase</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:27, 15 April 2016</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Ochurlaud
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61729&oldid=prev
*>AnneW at 12:24, 15 July 2012
2012-07-15T12:24:47Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:24, 15 July 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{Template:I18n/Language Navigation Bar|KDE_Utils/kwallet/Benchmark}}</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>
*>AnneW
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61728&oldid=prev
Neverendingo: Text replace - "</code>" to "</syntaxhighlight>"
2011-06-29T19:42:29Z
<p>Text replace - "</code>" to "</syntaxhighlight>"</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:42, 29 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l79">Line 79:</td>
<td colspan="2" class="diff-lineno">Line 79:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return 0;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return 0;</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div></<del style="font-weight: bold; text-decoration: none;">code</del>></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></<ins style="font-weight: bold; text-decoration: none;">syntaxhighlight</ins>></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Results ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Results ==</div></td></tr>
</table>
Neverendingo
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61727&oldid=prev
Neverendingo: Text replace - "<code cpp>" to "<syntaxhighlight lang="cpp">"
2011-06-29T19:38:59Z
<p>Text replace - "<code cpp>" to "<syntaxhighlight lang="cpp">"</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:38, 29 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l10">Line 10:</td>
<td colspan="2" class="diff-lineno">Line 10:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* only syncing the wallet is benchmarked</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* only syncing the wallet is benchmarked</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* due to hd caching (and a rather modest filesize), most of the time reported should be used encrypting the data.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* due to hd caching (and a rather modest filesize), most of the time reported should be used encrypting the data.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><<del style="font-weight: bold; text-decoration: none;">code </del>cpp></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><<ins style="font-weight: bold; text-decoration: none;">syntaxhighlight lang="</ins>cpp<ins style="font-weight: bold; text-decoration: none;">"</ins>></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#include <kaboutdata.h></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#include <kaboutdata.h></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#include <kcomponentdata.h></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>#include <kcomponentdata.h></div></td></tr>
</table>
Neverendingo
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61726&oldid=prev
*>Hualiang.miao: internationalization
2009-02-18T03:57:57Z
<p>internationalization</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 03:57, 18 February 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Template:I18n/Language Navigation Bar|KDE_Utils/kwallet/Benchmark}}</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>
*>Hualiang.miao
https://community.kde.org/index.php?title=KDE_Utils/kwallet/Benchmark&diff=61725&oldid=prev
Lemma: New page: == Summary == One of the main concerns users had with the wallet was that new entries weren't saved immediately ({{Bug|105752}}). Before actually getting to work and coding a workaround (...
2008-06-03T09:48:23Z
<p>New page: == Summary == One of the main concerns users had with the wallet was that new entries weren't saved immediately ({{Bug|105752}}). Before actually getting to work and coding a workaround (...</p>
<p><b>New page</b></p><div>== Summary ==<br />
<br />
One of the main concerns users had with the wallet was that new entries weren't saved immediately ({{Bug|105752}}). Before actually getting to work and coding a workaround (appending new passwords to the file without reencrypting all of it or creating a second file where new passwords are appended) I benchmarked the existing encryption to check the actual overhead that would be incurred by saving to the kwl file as soon as passwords were entered.<br />
<br />
== Code ==<br />
<br />
I used the following code for benchmarking. Please keep in mind:<br />
* keys and passwords generated using random data are probably longer than the entries you actually have in your wallet.<br />
* only syncing the wallet is benchmarked<br />
* due to hd caching (and a rather modest filesize), most of the time reported should be used encrypting the data.<br />
<code cpp><br />
#include <kaboutdata.h><br />
#include <kcomponentdata.h><br />
#include <kcmdlineargs.h><br />
#include <kdebug.h><br />
#include <kwallet.h><br />
#include <QApplication><br />
#include <QTime><br />
#include <QFile><br />
<br />
#include "../backend/kwalletentry.h"<br />
#include "../backend/kwalletbackend.h"<br />
<br />
using namespace KWallet;<br />
<br />
static int getRandomBlock(QByteArray& randBlock) {<br />
QFile devrand("/dev/urandom");<br />
if (devrand.open(QIODevice::ReadOnly)) {<br />
int rc = devrand.read(randBlock.data(), randBlock.size());<br />
if (rc != randBlock.size()) {<br />
return -3; // not enough data read<br />
}<br />
return 0;<br />
}<br />
<br />
return -1;<br />
}<br />
<br />
<br />
int main(int argc, char **argv) {<br />
KAboutData aboutData("kwalletbench", 0, ki18n("kwalletbench"), "version");<br />
KComponentData componentData(&aboutData);<br />
QApplication app( argc, argv );<br />
<br />
Backend back("/tmp/benchmark.kwl", true);<br />
<br />
back.open("benchmark");<br />
back.createFolder("benchmark");<br />
back.setFolder("benchmark");<br />
<br />
for (int i = 0; i <= 100000; i+=100) {<br />
for (int j = 0; j < 100; ++j) {<br />
Entry entry;<br />
QByteArray key, value;<br />
key.resize(20);<br />
if (getRandomBlock(key) != 0) {<br />
kDebug(0) << "Error";<br />
}<br />
value.resize(50);<br />
if (getRandomBlock(value) != 0) {<br />
kDebug(0) << "Error";<br />
}<br />
entry.setType(Wallet::Password);<br />
entry.setKey(key);<br />
entry.setValue(value);<br />
back.writeEntry(&entry);<br />
}<br />
<br />
QTime _start = QTime::currentTime();<br />
back.sync("benchmark");<br />
QTime _end = QTime::currentTime();<br />
<br />
kDebug(0) << i << ";" << _start.msecsTo(_end);<br />
}<br />
<br />
back.close();<br />
<br />
return 0;<br />
}<br />
</code><br />
<br />
== Results ==<br />
<br />
I benchmarked on a Q6600. As the encrypting code is single-threaded, only one core (2.4GHz) is being used. Please bear in mind that I didn't bother to run the test several times as the results are pretty clear - unfortunately this makes some of the numbers seem a little weird.<br />
<br />
* DebugFull<br />
** 1 password: 16ms<br />
** 100 passwords: 15ms<br />
** 1000 passwords: 32ms<br />
** 5000 passwords: 107ms<br />
** 10000 passwords: 192ms<br />
* Release<br />
** 1 password: 8ms<br />
** 100 passwords: 5ms<br />
** 1000 passwords: 15ms<br />
** 5000 passwords: 25ms<br />
** 10000 passwords: 56ms<br />
<br />
== Discussion ==<br />
<br />
I assume that your usual wallet will contain less than 1000 entries. Due to the fact that any workaround would have to encrypt at least 1 entry (~ 8ms) this workaround would save around 15ms - 8ms = 7ms. This is clearly insignificant. <b>Big overhead for syncing the wallet seems to be a myth.</b></div>
Lemma