>> Asger Alstrup Nielsen writes:
AAN> In practice, this problem is only exposed with some special
AAN> concatenation patterns, so we might not have a problem with the
AAN> current semantics. But it's worth trying to change our own
AAN> implementation to do this, and see if things improve. Notice
AAN> that the memory waste is never more than a constant factor of
AAN> 2, which we should be able to handle.
Also when using stl::string, and if you know something about the
strings you are going to concat then you should/could use a reserve()
first. Then you have the possiblity of using only as much mem as you
really need, and you make concat go fast. (and insertions and
replace...)
to change the policy in lyxstring, from add 8 elements when out of
mem, to add a factor of two is very easy. but let's keep it as is for
a while. It would be interesting to see if this really is a
bottleneck.
Lgb