Long Amarok project loading

Nicolás Alvarez nicolas.alvarez at gmail.com
Thu Sep 23 22:40:04 UTC 2010


On 23/09/2010, Aleix Pol <aleixpol at kde.org> wrote:
> On Thu, Sep 23, 2010 at 10:07 PM, Valentin Pavlyuchenko
> <thevalik at gmail.com>wrote:
>
>> Sorry, I don't know how to send you your cookies:)
>> Yes, you're absolutely right - cmake 2.8.2, ZLIB_VERSION 1.2.3.4,
>> find_package(ZLIB REQUIRED)
>> So what it means?
>>
>> P.S. Btw, these are Debian testing (future stable version - it's in
>> freeze now) software versions.
>>
>> --
>> Best regards,
>> Valentin Pavlyuchenko
>>
>>
>>
>> 2010/9/23 Nicolás Alvarez <nicolas.alvarez at gmail.com>:
>> > On 22/09/2010, Valentin Pavlyuchenko <thevalik at gmail.com> wrote:
>> >> Hi all,
>> >>
>> >> I'm using KDevelop 4.1 from git and I've tried opening Amarok project
>> with
>> >> it.
>> >> Currently project loading takes about 2 minutes to complete (just
>> >> cmake project loading, without parsing). My PC is not old one (Core 2
>> >> Duo, 3.2GHz).
>> >> Can someone explain me why it is so slow?
>> >
>> > Do you happen to have CMake 2.8.2, a zlib.h with ZLIB_VERSION defined
>> > to a four-component version number, and a find_package(ZLIB) call in
>> > Amarok's CMake scripts?
>> >
>> > I want cookies if I guessed all that right.
>> >
>> > --
>> > Nicolas
>> >
>>
>>
>
> Hey,
> I just tracked down the issue. It's a FindZLIB.cmake problem, the regex they
> use to match the version is wrong. If you want a quick fix, you can replace
> the line 41 with:
>
> STRING(REGEX REPLACE ".*#define ZLIB_VERSION
> \"([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1.\\2.\\3" ZLIB_VERSION_STRING
> "${ZLIB_H}")
>
> (note the change is that it doesn't expect to be >..._VERSION "n.n.n"< but
>>..._VERSION "n.n.n<, note the ending quote)
> This made that the version was never matched and then it basically didn't
> match, it spent all that time looking for it in that huge file (I agree it
> shouldn't take that long maybe).
>
> Does anyone know how to report that bug to cmake? (That's why I'm CC'ing
> kde-buildsystem, they might know who to talk to).

The FindZLIB bug was already reported to CMake, and afaik already
fixed in 2.8.3.

http://www.vtk.org/Bug/view.php?id=11005
http://www.vtk.org/Bug/view.php?id=11049

The problem we have is that CMake takes 10 seconds to run that silly
regex on a non-matching file, while QRegExp (used by the KDevelop
CMake parser) takes 4-5 *minutes*.

-- 
Nicolas




More information about the KDevelop-devel mailing list