Martin Kretzschmar wrote:
Kay Ramme - Sun Germany - Hamburg schrieb:

as the performance of rtl::OUStrings (the UNO C/C++ String) is coming up for discussions once a while (because of showing up in profiles e.g. when loading a large spreadsheet), I wrote a short paper

http://udk.openoffice.org/common/man/concept/string_invest.html

investigating especially into construction&destruction and suggesting a slightly modified variant, with improved behavior. So, if you have some time left, I would like to get your feedback ;-).


If I understand correctly, the current rtl::OUString has the interesting feature of being reinterpretable as/binary-identical to an rtl_uString* (the shared sequence on the heap) and vice versa. I have definitely seen code that freely casts between the two.

The "Shared-Heap-String-with-a-Buffer" sounds like a rtl::OUString (C++)-only plan. Wouldn't that introduce problems with code doing such casts?

Kay's proposal implies that we change UNO in an incompatible way (which would indeed affect code of the kind you mention, for example).

My criticism with the proposal is that it does not go far enough: If we ever take the big big step of changing UNO incompatibly, then instead of exchanging one concrete implementation of rtl::OUString with a slightly different one, we should rather investigate in replacing the concrete implementation with an abstract interface. Behind that interface, we can then experiment with well-tuned implementations for specific usage scenarios (see Eike's mail for an example), without the need to become incompatible once again.

-Stephan

Regards,

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to