Andre Poenitz wrote:
The attached patch replaces the signal/slot connections between Buffer
and BufferView to LyXView by ordinary delegates.

There has always been only (at most) a single connection of each type
with known endpoints, so full-blown signal/slot was overkill anyway -

I am sorry but that's not true for Buffer. With multi-workarea and multi-view there can be more than one connection to the Buffer::changed() signal.

at least given the price of boost's signal/slot:

As boost/signal pulls in roughly 50 kLOC into both Buffer.h and
BufferView.h which in turn heavily used throughout the code.
So the change reduces "TLOCC" from 24.6M to 22.5M, i.e. by more than 9%!

There might be a few simplifications possible after that, but I wanted
to keep the patch small.

Please wait with that until we understand the full repercussion of that change. I really sympathize with your compil time reduction goal but I don't think this is the right solution:

* For one, you are working around a compiler that do not implement pch efficiently. I am pretty sure MSVC will not be affected much by your patch.

* Second, did you tried a more recent version of gcc? Gcc 4.2 seems good on the paper.

* Third, I don't know if you remember but I worked an awful lot to get rid of the WorkArea and LyXView dependency in the core. You are basically putting them back :-(

On the third point, I understand this is not exactly the same thing. The problem with boost signals is that they need full visibility of the objects so we cannot put them in a private implementation. OK, so let's focus on the signal solution itself:

- BufferView: I think that most if not all the signal could go with some more cleanup. This is the right way forward IMO.

- Buffer: only the changed() signal is important. One solution would be to have a centralized Buffer manager that will track the WorkAreas connected to it and update them if need be. This will avoid the need for this signal in particular. All other signals could and should be removed.

I hope you are not too upset with my reaction.

Abdel.




Reply via email to