AW: KConfig/KLockFile performance (was KMimeType performance)

Nhuh Put nhuh.put at web.de
Tue Oct 9 21:39:08 BST 2007


Von: Thomas Braxton
Gesendet: Dienstag, 9. Oktober 2007 21:22
An: kde-core-devel at kde.org
Betreff: Re: KConfig/KLockFile performance (was KMimeType performance)

> On 10/9/07, David Faure <faure at kde.org> wrote: 
> On Tuesday 09 October 2007, Maksim Orlovich wrote:
> > KDesktopFile/KConfig tries to lock the file with KLockFile
>
> Huh. I thought we got rid of the "bool readonly" because it made no behavior difference, 
> but if KConfig locks the file then surely we need a "ReadOnly" flag again?
> Or better: we should lock at the time of writing to the file, not when just reading from it!
>
> your mail came in as I was sending the last patch, here's another try. this time only locking in sync() and only if the file is read-write.

This should work, but there is one problem: configState is only set to ReadOnly in
KConfig::isConfigWritable, which is normally not called, so there should probably be
a call to it in KConfigPrivate::changeFileName, or this will not have much effect.

	PutHuhn

 





More information about the kde-core-devel mailing list