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

List:       kde-devel
Subject:    Re: A note to exceptions && some notes to codesize
From:       Alex Zepeda <garbanzo () hooked ! net>
Date:       1999-06-16 22:21:42
[Download RAW message or body]

On Wed, 16 Jun 1999, Lubos Lunak wrote:

> Well, I thought the configure script does this, before I realized this :
>
> Why does it check if g++ supports -fno-exceptions when it actually
> doesn't use it ?

This is libtool checking if the compiler supports -fno-exceptions.  I'm
not sure what it does with this information or why.

> While compiling most of the applications with -fno-exceptions doesn't
> seem to change the memory usage much ( 8kB for kwrite, bah ), it at
> least noticeably decreases the size of the binary file.

But there are also quite a few other bigger, more memory hungry apps out
there.

>  Libraries seem to affect the memory usage much more than the
> application itself, recompiling kdelibs-1.1.1 with -fno-exceptions
> decreases the memory usage by 500Kb per running app on my Linux ( and
> I wonder why all KDE apps need so much memory, the exception tables
> are not shared ? ).

>  Compiling the libraries without exceptions support could be a problem
> for someone who would really want to use them,

Such as someone using CORBA?

> but saving several megs of RAM is IMHO worth it ( Miguel the Big Mouth
> : 'KDE ... uses up too much memory' ; me : 'when I last tried Gnome it
> used even more' :-> ). Well, in the end, replacing -fno-exceptions
> version of kdelibs with -fexceptions one is not that difficult if it
> would be really needed.

Unless your program malfunctions because of this and you get a whole lot
of bad press..

> And there's also another way how to reduce the "bloat" caused by
> exceptions - to really use them :).

They are used :)  (Perhaps for KDE 1.1.2, disabling exceptions wouldn't be
a horrible idea, but it *might* break ksirc and it wouldn't really fix
anything).

Besides, you'd probably gain a bigger memory savings by working to reduce
kdelibs's memory consumption.  For instance there's a lot of temporary
variables (counters and intermediate QStrings and the like) that could be
trimmed, there's dead classes (KClipboard?), dead code (anything that uses
QStrList) and so-on.  It may not provide the immediate results that
disabling exceptions might have, but it'll provide more of a longterm
benefit.

- alex

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

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