[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [path] litte kDebug extension
From: Thiago Macieira <thiago () kde ! org>
Date: 2007-09-14 11:15:00
Message-ID: 200709141315.01127.thiago () kde ! org
[Download RAW message or body]
On Friday 14 September 2007 10:21:13 Thomas Zander wrote:
> On Friday 14 September 2007 08:51:52 Boudewijn Rempt wrote:
> > > In all but the largest of applications, area 0 should suffice.
> > >
> > > If you don't want those areas to show up during your debugging, don't
> > > debug that application :-)
> >
> > I don't think Krita is particularly large, about 100 kloc. But I still
> > want to be able to disable the redisplay debug lines and enable the
> > filter debug lines. And I guess that it's the same with other
> > applications of that size.
>
> Agreed,
>
> also note that _printing_ debug still is an overhead and especially in an
> app like Krita where lots of code and libs are used while doing normal
> painting you want to be able to disable debugging of, for example, the
> image library. Since you are debugging a krita-plugin with debug area 0.
It makes no difference in overhead if the debugging statement is printed or
not. It's still evaluated, processed, stored in a QString and then QDebug
will call write() on a QIODevice that will discard the contents.
There's no way around it without modifying QDebug -- which I might do for Qt
4.4.
The only way to avoid the overhead is to disable debugging completely in the
application. And then it doesn't matter whether the area was 0 or not.
kDebug() will evaluate to:
if (false); else kDebugDevNull()
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic