[Qt-interest] Performance problem with Qt4.6.2 and QString on lucid ubuntu
Frank Mertens
frank at cyblogic.de
Thu Mar 18 18:48:24 CET 2010
Abdelrazak Younes wrote:
> Hello,
>
> With Qt4.6.2 my application sudenly rquires a lot of CPU under Linux
> (about 40% cpu, compiled with gcc-4.4 ubuntu lucid). A quick oprofile
> reveals that most of the time is in QBasicAtomicInt::deref() and
> QString::~QString().
>
> The same application compiled with MSVC-2008 on Windows takes basically
> no-cpu (less than 1%).
> The same application compiled with Qt4.5.2 on a Debian system doesn't
> have this problem either...
>
> In my application I do a lot of data passing from the core to the gui
> using QStrings and QStringList. Either by copy and using const reference.
>
> Any idea someone?
>
Well, gcc has a fallback for its atomic counters to use a pthread_mutex, if
the platform does not support atomics and sometimes gcc also gets it wrong...
More information about the Qt-interest-old
mailing list