[Libreoffice] [PATCH] 1/4 tools/rtti.hxx cleaning

Michael Meeks michael.meeks at suse.com
Mon Dec 19 12:27:31 PST 2011

Hi Rafael,

On Mon, 2011-12-19 at 13:03 -0430, Rafael Dominguez wrote:
> Just some cleanup of tools/rtti.hxx macros for c++ RTTI.

	Gosh :-) you are brave. I suppose there is some residual performance
concern about this sort of thing; then again I think that many of our
SfxItemSet items are rather shallowly inherited - just a couple of jumps
to SfxFooItem etc. - so perhaps it won't be so bad. The SfxItemSet
grab-bag is used in some pretty inner of inner loops JFYI so ... lets

>  Theres a bunch of patchs but they are very straightfoward.
> In the future can i push the patch myself or should i continue sending
> them to the ml for review??

	If we're resolved to do this thing; which - I suspect we should, then -
if you are 100% confident, then I'm not sure these would need review. I
wonder if there is an easy way (by leaving the existing macros in-place
but changing their impl. to use dynamic_cast) whether we could do some
profiling of: medium sized word document (with diverse styles &
formatting) load, same for medium sized spreadsheet, and large PPT -
before and after. [ the best way to do that is to run before & after in
callgrind the way to do that is:

valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin -writer --splash-pipe=0 <test-file.ods>

	You can then leave it un-attended & get a nice number out.

	Beyond the malingering performance concern, I'm all for this :-)

	As a minor nit:

            // Check type since it is destroyed when the type is deleted
            if(GetStyleSheet() && HAS_BASE(SfxStyleSheet, mpStyleSheet))

	If indeed we don't need to check the type, we should prolly drop the
comment as well [ did you look at the commit that added those comments
in the history ? with git annotate - perhaps there is something
interesting there ].

	Anyhow - great to have you cleaning this up.



michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list