[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: Re: Silly CMake 2.8.2 regex causing slow project load in KDevelop
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2010-07-19 7:21:16
Message-ID: 20100719072116.GB1225 () barmbek
[Download RAW message or body]
On 18.07.10 23:35:36, Nicolás Alvarez wrote:
> Since I upgraded to CMake 2.8.2, KDevelop takes almost four minutes to
> load my project, before it appears in the Project toolview and C++
> parsing starts. I tracked it down to a very slow regex in
> FindZLIB.cmake:
>
> FILE(READ "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H)
> STRING(REGEX REPLACE ".*#define ZLIB_VERSION
> \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3"
> ZLIB_VERSION_STRING "${ZLIB_H}")
>
> On my machine, and with my zlib.h, QRegExp takes 3 minutes 55 seconds
> to process the regex (measured, test case attached),
Hmm, just tried this and if I generate a release-build for your sample
then it takes less than a fraction of a second to run it. If I change
the qmake project to do a debug build it indeed takes a long time to do
the replacement.
Whats the expected output of your app for the 4-digit and 3-digit
version number? The reason I'm asking is that I get different output
depending on release/debug mode compilation for the 3-digit zlib version
(the 4-digit always prints out "" as 3rd line).
Andreas
--
Someone whom you reject today, will reject you tomorrow.
--
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic