On Wed, May 30, 2007 at 02:37:43PM +0200, Jean-Marc Lasgouttes wrote: > >>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Abdelrazak> I agree but it's more work than my signal based solution > Abdelrazak> which is assured to work in all cases. I tell you what, in > Abdelrazak> order to save the bits Andre is worried about I am going > Abdelrazak> to remove the signal from Inset and transfer them to > Abdelrazak> InsetText and InsetMathHull. In 1.6, we can think of this > Abdelrazak> other solution. But really, my solution is cheap in terms > Abdelrazak> of CPU and it will be cheaper in terms of memory when I do > Abdelrazak> the change described above. > > So it is not realted to Helge's comlaint that moving the cursor > produces a high CPU load?
I have just browsed through boost/signals and I have a hard time to believe my eyes. A signal is not only the 20 static bytes I noticed yesterday, but there is Pandora's box of dynamic components hidden in it. When no slot is connected, a signal takes up a total of ~200 bytes of static and dynamic memory, connected to a single slot it takes ~280 bytes. This is ridiculous. Andre' PS: Same test for Qt signal/slot gives btw ~190 bytes for a connected signal and <100 for an unconnected one. So once more we picked the more expensive solution, but that's an issue I do not want to discuss in this thread...