Hi there,
So - I'm investigating the large number of duplicate / allocated
strings that float around the place. It seems like the framework is an
offender here:
incidence Name size wasted
~350 Type 16 5584
548 UIName 20 10940
368 CommandURL 28 10276
351 HelpURL 22 7700
347 Label 18 6228
281 ItemDescriptorContainer 54 15120
Total 55,848
Of course, the overhead of so many small allocations is quite high too
I think, so it'd be good to fix this, and I guess it's prolly quite
easy, I imagine the sequence population in:
void SAL_CALL OReadMenuBarHandler::startElement:
Sequence< PropertyValue > aSubMenuProp( 5 );
aSubMenuProp[0].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ));
aSubMenuProp[1].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL ));
..
and similar code cut/pasted in:
void SAL_CALL OReadMenuPopupHandler::startElement(
void SAL_CALL OReadToolBoxDocumentHandler::startElement( - 3 incidences
explain the problem.
Of course, simple to fix - the question is, how do you want me to do
this ? in this 31337, threaded world where we don't want global inits;
it's not clear to me what the right solution is.
Is there a well-defined init time for this code ? [ some service
activation or something ] that we can hook to create some global
members ? or is there a better way ?
Thanks,
Michael.
--
[EMAIL PROTECTED] <><, Pseudo Engineer, itinerant idiot
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]