[PATCH] Speeding up kdebug

David Faure faure at kde.org
Tue Oct 14 23:23:19 BST 2003


On Tuesday 14 October 2003 23:07, Nicolas Goutte wrote:
> No, it is not one-time only or we would have not had this big kdebug 
> discussion for just one entry in kdebug.areas. (I have counted 60 calls in my 
> .X.err for one hour of up-time. I do not know if it is typical or not.)

It is one time, *per process*.
Of course in your .X.err it appears several times, since you launch several
processes.

Another idea I had today about speeding up kdDebug was whether it would
gain anything to check that we're going to print out anything, in the constructor
of kdbgstream, to skip all the string concatenation if we're going to eat the
debug output anyway. This might speed up KAccel/KAction stuff since by default
125/129 are disabled, and this is called very often. At the moment it's kDebugBackend,
called during flushing, which determines whether the printing is enabled or not.

Anyway - this speeds things up for developers only. End users get all this
optimized out. I just want to prevent misunderstandings here :)

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list