[Qgis-developer] Expression texts taking 30 minutes on Mac

Larry Shaffer larrys at dakotacarto.com
Tue Sep 29 16:10:01 PDT 2015


Hi,

On Tue, Sep 29, 2015 at 3:10 PM, Larry Shaffer <larrys at dakotacarto.com>
wrote:

> Hi,
>
> On Tue, Sep 29, 2015 at 2:59 PM, Nyall Dawson <nyall.dawson at gmail.com>
> wrote:
>
>>
>> On 30 Sep 2015 05:10, "Jürgen E." <jef at norbit.de> wrote:
>> >
>> > Hi Larry,
>> >
>> > On Tue, 29. Sep 2015 at 11:22:32 -0600, Larry Shaffer wrote:
>> > > qgsexpression_texts.cpp is 144 KB on my two build boxes.
>> > > Here's the generated file:
>> > > https://gist.github.com/dakcarto/d55927def236e269295a
>> > >
>> > > The file is the same on both Mac 10.7 and 10.9 boxes.
>> > >
>> > > qgsexpression.cpp is ~128 KB on my two build boxes.
>> >
>> > Odd, qgsexpression_texts.cpp takes 22s here and qgsexpression.cpp 43s
>> (gcc
>> > 5.2.1 on Linux).  But both brings a "note: variable tracking size limit
>> > exceeded with -fvar-tracking-assignments, retrying without".
>> >
>> > I didn't notice any significant longer compile times on Windows either.
>> >
>> > No clue why qgsexpression_texts.cpp takes so much longer on OSX.
>>
>> It's also fine on the Travis OSX builds. Maybe something local with your
>> build environment?
>>
> Maybe, maybe not. It appears the file takes forever to optimize for
the CMAKE_BUILD_TYPE=RelWithDebInfo or Release, which on my Clang setup
defaults to:

CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

If I set the optimization to -O1, -O0 or none, then the compiling of the
file drops to mere seconds, even on my older 'nightly build' Mac.

Here is what I propose for a CMake adjustment on the compile flags for just
that file:

https://gist.github.com/dakcarto/0cc443708487d205254a

Since I am confessedly a absolute noob when it comes to compiling
optimizations, I would appreciate an opinion on that diff. Also, if you
usually do Debug builds (no optimization), can either of you try compiling
with CMAKE_BUILD_TYPE=Release or RelWithDebInfo to see if the slow
compiling shows up for you?

The Travis build does not have CMAKE_BUILD_TYPE set, i.e. is None or just
CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used, which combined are
"-Wno-deprecated-declarations". So no optimization there, so no apparent
issue.

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota



> Thanks to you both for checking into this. Will review my setups here.
>
> Regards,
>
> Larry Shaffer
> Dakota Cartography
> Black Hills, South Dakota
>
> Nyall
>>
>> >
>> >
>> > Jürgen
>> >
>> > --
>> > Jürgen E. Fischer           norBIT GmbH             Tel.
>> +49-4931-918175-31
>> > Dipl.-Inf. (FH)             Rheinstraße 13          Fax.
>> +49-4931-918175-50
>> > Software Engineer           D-26506 Norden
>> http://www.norbit.de
>> > QGIS release manager (PSC)  Germany                    IRC: jef on
>> FreeNode
>> >
>> > _______________________________________________
>> > Qgis-developer mailing list
>> > Qgis-developer at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150929/e984ae01/attachment-0001.html>


More information about the Qgis-developer mailing list