[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kdebug vs. non-debug builds
From:       "Jaison Lee" <lee.jaison () gmail ! com>
Date:       2007-12-23 14:37:17
Message-ID: 2d720bd30712230637r1fbe9c71rce4f93d0f3c17f73 () mail ! gmail ! com
[Download RAW message or body]

> > > > #if !defined(KDE_NO_DEBUG_OUTPUT)
> > > > # define kDebug        KDebug(QtDebugMsg, __FILE__, __LINE__, # Q_FUNC_INFO)
> > > > #else
> > > > # define kDebug        if (1); else kDebug
> > > > #endif
> > > >
> >
> > I'm not certain of its brilliance, but I did notice that the offending
> > definition is actually a redefinition of kDebug and kWarning from
> > further up in the same file. Simply commenting out the faulty
> > definitions has so far seemed successful.
> >
> uhm, no, not really. notice that the kDebug is in the else branch of an
> always true condition, i.e., it will be completely eliminated by the
> compiler after the syntax check. just removing the if works as such, but
> generates quite some code just for the purpose of sending messages down
> the drain ...

I'm forced to wonder if you actually looked at the patch before
sending this. If you did, then I have no idea what you are talking
about. The statement "if !defined KDE_DEBUG_OUTPUT" on line 109 is
hardly an always true statement, at least not after Allen's patch a
few days ago.

As far as I can tell my patch works and I committed it. Things can
actually compile now, the debug output is removed, and KDE4 runs
noticeably (at least) faster, as would be expected from the
elimination of all the debug output. (Actually, it runs incredibly
faster; you guys gotta check this out.)

I did not do anything about the KDE3_SUPPORT stuff.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic