KWalletD syncing

Michael Leupold lemma at confuego.org
Fri Jun 13 07:58:31 BST 2008


Am Freitag, 13. Juni 2008 schrieb Aaron J. Seigo:
> > I've prepared a small patch to add syncing on every change. Unfortunately
> > it makes the wallet be synced 3 times on creating a new one. What do you
> > think?
> usually what i do in such situations is move the syncing to a slot and then
> call that slot with either a zero timer (so as soon as the event loop gets
> hit again) or a reasonably short timeout[1] from the places that a sync
> should be triggered.

Yeah, you're absolutely right. Coincidentally this is exactly what came to my 
mind when I started sipping my first coffee this morning 10 minutes ago :-)

> that way if multiple syncs get called in a row (or, at least, within the
> timeout period) you get just one sync instead of repeated syncs.
> btw, have you tested the performance impact of this with large wallets?
> [1] what "reasonably short" means is very much up to the exact application
> being considered.

I've benchmarked up to 10000 entries in the wallet (20 byte key, 50 byte 
value). Syncing it took about 56ms on my Q6600 in release mode.

Regards,
Michael




More information about the kde-core-devel mailing list