Silly CMake 2.8.2 regex causing slow project load in KDevelop

Andreas Pakulat apaku at gmx.de
Mon Jul 19 16:32:39 UTC 2010


On 19.07.10 12:39:54, Nicolás Alvarez wrote:
> El 19/07/2010, a las 10:07, Andreas Pakulat <apaku at gmx.de> escribió:
> >On 19.07.10 09:21:16, Andreas Pakulat wrote:
> >>
> >>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).
> >
> >Hmm, this testcase is rather strange here on my laptop. I've replaced
> >the QString::replace with QString::indexOf() as thats more clear
> >wether
> >something was matched or not. I'm using Qt4.6.2 here. The result is:
> >
> >debug build, 4 digit version number:
> >I've cancelled this after 5 minutes, seems to hit some kind of endless
> >loop in QRegExp
> >
> >debug build, 3 digit version number:
> >Instant, with proper result.
> >
> >release build, 4 digit version number:
> >Instant, wrong result, I get -1!
> >
> >release build, 3 digit version number:
> >Instant, wrong result, I get -1!
> >
> >Does anybody else see this?
> 
> Yes; take the file open() call out of that ugly Q_ASSERT. *hangs
> head in shame*

/me hangs head too. I should've been able to see that :)

I'm still wondering what QRegExp does in debug mode with 4 digits that
its taking more than 5 minutes here. Unfortunately valgrind isn't really
helpful, except telling me that some QRegExp internal functions are
called millions of times.

Andreas

-- 
Questionable day.

Ask somebody something.




More information about the KDevelop-devel mailing list