Hello Niklas,

>>namespace sdecl = comphelper::service_decl;
>>sdecl::ServiceDecl const myDecl(
>>    sdecl::class_<MyImpl>(),
>>    "org.openoffice.MyService",
>>    [optional "my.implementation.name"] );
> 
> 
> If used as a global object, with a constructor that is executed when the 
> DLL is loaded, that won't help with start-up performance.

IMO it doesn't matter whether you create that data (mostly the
implementation name) at the point of loading the library or slightly
later when the UNO service needs to be instantiated.
But I agree that those ctors are executed even though not all services
may be needed from that library, e.g. at the extreme if only one of 100
is used.  Thus, it makes sense to optimize the current ctors, so they
only save the passed char pointers, late-initializing OUString/Sequence
objects when needed.  For the case of multiple supported services we
could e.g. use a separated list of service names like
"Service1;Service2;...".  All in all, I assume runtime performance is
hardly affected then.

regards,
-Daniel

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

Reply via email to