[PATCH] KConfig: Rewrite globals only if modified

Chusslove Illich caslav.ilic at gmx.net
Mon Feb 25 19:40:19 GMT 2008

> [: Oswald Buddenhagen :]
> i mentioned in my first reply that it should be only one loop that
> determines both writeGlobals and writeLocals to keep the penalty low.

I was thinking along the lines that going through a map will be shadowed by
file operations in the backend anyway, and thought it would be nicer to
group each decision with its config write. But I certainly wouldn't go and
test performance over it.

> that bDirty stuff looks wrong. maybe that would work: once the function is
> entered, set bDirty false. then, either of the branches can re-assert
> bDirty if writeout fails. that should keep everything consistent easily.

It was odd to me that the original code didn't check for the success of the
global config write, but I didn't want to touch it, lest I break
"transaction behavior" again :)

Then, fourth version attached.

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kconfig-04.diff
Type: text/x-diff
Size: 2075 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080225/5b46f5a1/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080225/5b46f5a1/attachment.sig>

More information about the kde-core-devel mailing list