Excessive exception size cost ...
Stephan Bergmann
sbergman at redhat.com
Tue Mar 27 09:29:39 PDT 2012
On 03/27/2012 04:21 PM, Michael Meeks wrote:
> Well, we force page them in as we launch LibreOffice, and then we go
Yeah, the pagein hack. More a testimony that we are doing something
wrong here -- trying to outsmart the OS instead of fixing it --, than a
legitimate critique on the exception handling implementation, IMO.
> throwing a handful of random non-exceptional UNO exceptions as we start
> up, so ... not sure :-)
Routinely thrown exceptions indicate design bugs; addressable latest
with an incompatible LO 4.
> Presumably exceptions are fair enough in the UNO-world where exception
> throwing is done mostly for fun - before sfx2 throws all the results
> away in favour of a user-reported, and translated 'General Error'
> wrapper ;-)
That wrapper, more often than not, is a bug rather than a feature. I
often wished that exceptions indicating programming or packaging errors
were left unhandled, leading to easy-to-diagnose unhandled exception
termination rather than unhelpful LO error boxes.
> Obviously as we use UNO less for core functionality for
> which it is not suited, I suggest we try to avoid using exceptions in
> new code where possible, and try to avoid these highly granular
> exceptions that ripple up from every trivial object allocation / string
> method.
I still do not consider the eh table sizes problematic enough to dismiss
exceptions as a useful tool. If you are concerned about object size,
I'd rather look into things like -Os or generally removing cruft from
our code base.
Stephan
More information about the LibreOffice
mailing list