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

List:       kopete-devel
Subject:    Re: [kopete-devel] Proposal: Decreasing code size
From:       "Michal Vaner \(Vorner\)" <michal.vaner () kdemail ! net>
Date:       2005-09-23 12:34:12
Message-ID: 200509231434.12767.michal.vaner () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday 23 of September 2005 10:43, Ivor Hewitt wrote:
> On Friday 23 September 2005 09:10, Heiko Schaefer wrote:
> > Am Donnerstag, 22. September 2005 19:23 schrieb Ivor Hewitt:
> >
> > kopete is more than only the kopete binary and the libkopete. It has
> > dditionaly the plugins for the protocols and for the other plugins. I
> > come over 40 Mbyte.
>
> So what's the problem? It's comprised of numerous optional plugins, that
> you can use if you need them.
>
> > Every c++ compiler generates autoatically a copy constructor and a
> > operator=. Even gcc which I use.
>
> No it WONT.
>
> It will only generate them if it needs to synthesise them for an operation
> such as passing by value. It won't automatically make them for every class
> you have defined.

Well, even if the compiler does provide a copy constructor for every class, 
the specification says that the linker will not include unused functions in 
the output, if it is not used (that is the same for constructors, as they are 
only functions).

However, there might be difference with libs. The linker have to put there 
_everything_ that may be accessible by another program. Therefore, even the 
copy constructor, as it may be used bo something that links against that lib.

So I think there is no difference with this in Kopete itself, but libkopete 
probably has the copy constructor included. But I guess they are really small 
pieces of code and that it does not worth even thinking about them. That 4 or 
5 kilobytes of copy constructors does not matter in these 40 MB, right?

> > Beside the code size in this article are the security aspects described:
> > http://www.mozilla.org/hacking/portable-cpp.html#copy_constructors
>
> Ok so that's a completely different issue/problem.... and has nothing
> nothing nothing nothing to do with SECURITY.
>
> > BTW: Do you know Scott Myers book "Effective C++"? There this issuew is
> > decribed in detail.
>
> Yes I'm well aware of the book thank you. It isn't describing the problem
> you're talking about.
>
> There are much better more constructive ways of reducing an apps footprint.
>
> Regards,

-- 

Windows are like... windows. Shiny, fragile, expensive.

Michal Vaner (Vorner)

[Attachment #5 (application/pgp-signature)]

_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel


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

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