Re: [LyX/master] update buffer after fixBiblio

2019-04-20 Thread Richard Kimberly Heck
On 4/20/19 1:47 PM, Juergen Spitzmueller wrote:
> commit 0a4686d8d345e7d2924bf990e99d957f045d581e
> Author: Juergen Spitzmueller 
> Date:   Sat Apr 20 19:53:24 2019 +0200
>
> update buffer after fixBiblio
> 
> fixes: #2743
> ---
>  src/Paragraph.cpp |2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
> index 4e36f7f..e5327a4 100644
> --- a/src/Paragraph.cpp
> +++ b/src/Paragraph.cpp
> @@ -3723,6 +3723,8 @@ int Paragraph::fixBiblio(Buffer const & buffer)
>   insertInset(0, inset, font, Change(track_changes ? Change::INSERTED
>  : Change::UNCHANGED));
>  
> + // This is needed to get the counters right
> + buffer.updateBuffer();
>   return 1;
>  }

I am guessing this will be fine, but just so we're all on the lookout:
There have been cases where we're just 'not ready' for updateBuffer.
That's why we have the machinery to defer doing that until the end of
some other process. So if we start seeing crashes in certain cases, it'd
be worth looking here.

Riki




Re: LTO

2019-04-20 Thread Kornel Benko
Am Donnerstag, 18. April 2019, 18:47:07 CEST schrieb Jean-Marc Lasgouttes:
> Le 18/04/2019 à 18:34, Pavel Sanda a écrit :
> > On Thu, Apr 18, 2019 at 05:05:30PM +0200, Jean-Marc Lasgouttes wrote:
> >> Le 18/04/2019 ?? 16:54, Pavel Sanda a écrit :
> >>> It used to be that LTO could quite increase linking time, is there some
> >>> visible compil time difference for lyx?
> >>
> >> Yes, the link time is longer, but it seems that one can use -flto=4 to use
> >> 4 CPUS.
> >>
> >> For reference, the configure line I used was:
> >> ../master/configure --enable-build-type=rel --with-version-suffix=-master
> >> CXX='g++ -flto' AR='gcc-ar' RANLIB=gcc-ranlib LD='g++ -flto'
> >>
> >> I could try to include that in configure (and test it with clang too).
> > 
> > I am excited to see how this flies on my 10y old laptop.
> > If no other mail comes it means I got swapped to death :)
> 
> I guess that memory is the difficult point.
> 
> JMarc
> 

I tried to add the options to CMake build. I don't see any difference in 
lyx-behavior,
apart from the size of executables.
Other difference to the automake are the supplied flags to gcc (compile and 
link time),
namely "-flto -fno-fat-lto-objects".

The needed set of cmake variables are:
1.) cmake_minimum_required(VERSION 3.9)
are we ready for that? 3.9 was released July 2017
2.) cmake_policy(SET CMP0069 NEW)
This policy started with version 3.8, it enables the use of 3.)
3.) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
This enables the optimization for compilers which support it. (Clang 
for instance does not belong to this set)

Kornel




signature.asc
Description: This is a digitally signed message part.