[Libreoffice-commits] core.git: Changes to 'private/jmux/multi-index-5-1'
Jan-Marek Glogowski
glogow at fbihome.de
Sat Jun 20 15:00:59 PDT 2015
So I've added a patch on top of the changeset in the spirit of
tdf#75757. No more "using" and "namespace aliases".
I want to profile this change after my holiday. It's actually a
replacement for the whole private/jmux/sorted-pagedesc+spzfrmfmts
changeset and wouldn't introduce the semantic change of a sorted vector.
The original changeset AFAIK showed a 30% faster load time for large MM
documents with many frames and page descriptions and even improved the
general unit test time. I guess that's still the case with the
multi-index structure.
And it survives make check, slowcheck and subsequentcheck on master.
Jan-Marek
Am 18.06.2015 um 10:33 schrieb Stephan Bergmann:
> On 06/18/2015 09:32 AM, Miklos Vajna wrote:
>> One nitpick: please avoid namespace aliases or using statements in
>> headers[1], currently ~no code does that (com::sun::star -> css is the
>> only exception, I think), and it helps readability: that way you can
>> always go to the start of the file and see all of them.
>>
>> Just mentioning as I guess this affects each class where you add
>> multi-index support, so it saves time if you get this right from the
>> very beginning.
>>
>> [1] https://wiki.openoffice.org/wiki/Writer/Code_Conventions says
>> "header files, where using-statements are not permitted", AFAIK that's
>> still true for LO code, too
>
> Beware, though, the differences between
>
> (1) namespace aliases,
>
> namespace foo = bar::baz;
>
> (2) using declarations,
>
> using foo::bar;
>
> (3) using directives,
>
> using namespace foo::bar;
>
> Technically, only (3) is generally problematic in include files (esp. in
> global scope), as it pollutes the respective scope with a set of names
> that may change over time, for all compilation units including that file.
>
> (1) and (2) introduce single names into a scope; whether to allow them
> in include files is more a matter of taste.
>
> (There is no "using-statements" in C++, whatever
> <https://wiki.openoffice.org/wiki/Writer/Code_Conventions> wants to talk
> about.)
More information about the LibreOffice
mailing list