Results 1 to 9 of 9

Thread: Unacceptable build time

  1. #1
    Join Date
    Jul 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Unacceptable build time

    I tried to build the Diagram Scene Example with Qt Creator 2.0.0 from qt-sdk-win-opensource-2010.04.exe. Here is a chronology of the build process:

    15:21 Build started.
    15:41 Build and Parsing progress bars are still empty.
    15:45 There is no Parsing progress bar. The Build bar is still empty.
    16:08 The Build bar is still empty.
    16:14 There is an empty Indexing progress bar. The Build bar is still empty.
    16:21 Build ended.

    Why the build time is 1 hour?

    The CPU time of Qt Creator after the end of the build was 1 min 14 s. During the build process there weren't CPU intensive applications with priority higher than Low.

  2. #2
    Join Date
    Jul 2010
    Posts
    53
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unacceptable build time

    16:14 There is an empty Indexing progress bar. The Build bar is still empty.
    bulid wouldn't start before indexing has finished.
    seems like u have too many dependencies in your project. take a look at compile output.

  3. #3
    Join Date
    Jul 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unacceptable build time

    So you effectively suppose that compiling a relatively simple example Qt application can took 1 hour. That's an absurd.

    I tried to post the Compile Output verbatim, but I got an error:
    "The text that you have entered is too long (12991 characters). Please shorten it to 10000 characters long."

    So I made the following substitutions to shorten it:
    Original string: -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\diagramscene" -I"." -I"..\..\..\mkspecs\win32-g++"
    Substitution string: [g++ options]

    Original string: -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\diagramscene" -I"." -I"..\..\..\mkspecs\win32-g++"
    Substitution string: [g++ options2]

    Original string: -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\diagramscene" -I"." -I"..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32
    Substitution string: [moc options]

    Original string: -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\diagramscene" -I"." -I"..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32
    Substitution string: [moc options2]

    Running build steps for project diagramscene...
    Starting: "c:/qt/qt/bin/qmake.exe" C:/Qt/qt/examples/graphicsview/diagramscene/diagramscene.pro -r -spec win32-g++
    The process "c:/qt/qt/bin/qmake.exe" exited normally.
    Starting: "C:/Program Files/MinGW/bin/mingw32-make.exe" -w
    mingw32-make: Entering directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    C:/Program Files/MinGW/bin/mingw32-make -f Makefile.Debug all
    mingw32-make[1]: Entering directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    g++ [g++ options] -o tmp\obj\debug_shared\mainwindow.o ..\diagramscene\mainwindow.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\diagramitem.o ..\diagramscene\diagramitem.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\main.o ..\diagramscene\main.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\arrow.o ..\diagramscene\arrow.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\diagramtextitem.o ..\diagramscene\diagramtextitem.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\diagramscene.o ..\diagramscene\diagramscene.cpp
    C:\Qt\qt\bin\moc.exe [moc options] ..\diagramscene\mainwindow.h -o tmp\moc\debug_shared\moc_mainwindow.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\moc_mainwindow.o tmp\moc\debug_shared\moc_mainwindow.cpp
    C:\Qt\qt\bin\moc.exe [moc options] ..\diagramscene\diagramscene.h -o tmp\moc\debug_shared\moc_diagramscene.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\moc_diagramscene.o tmp\moc\debug_shared\moc_diagramscene.cpp
    C:\Qt\qt\bin\moc.exe [moc options] ..\diagramscene\diagramtextitem.h -o tmp\moc\debug_shared\moc_diagramtextitem.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\moc_diagramtextitem.o tmp\moc\debug_shared\moc_diagramtextitem.cpp
    c:\Qt\qt\bin\rcc.exe -name diagramscene ..\diagramscene\diagramscene.qrc -o tmp\rcc\debug_shared\qrc_diagramscene.cpp
    g++ [g++ options] -o tmp\obj\debug_shared\qrc_diagramscene.o tmp\rcc\debug_shared\qrc_diagramscene.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\diagramscene.exe object_script.diagramscene.Debug -L"c:\Qt\qt\lib" -L"c:\Qt\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
    mingw32-make[1]: Leaving directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    C:/Program Files/MinGW/bin/mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    g++ [g++ options2] -o tmp\obj\release_shared\mainwindow.o ..\diagramscene\mainwindow.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\diagramitem.o ..\diagramscene\diagramitem.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\main.o ..\diagramscene\main.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\arrow.o ..\diagramscene\arrow.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\diagramtextitem.o ..\diagramscene\diagramtextitem.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\diagramscene.o ..\diagramscene\diagramscene.cpp
    C:\Qt\qt\bin\moc.exe [moc options2] ..\diagramscene\mainwindow.h -o tmp\moc\release_shared\moc_mainwindow.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\moc_mainwindow.o tmp\moc\release_shared\moc_mainwindow.cpp
    C:\Qt\qt\bin\moc.exe [moc options2] ..\diagramscene\diagramscene.h -o tmp\moc\release_shared\moc_diagramscene.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\moc_diagramscene.o tmp\moc\release_shared\moc_diagramscene.cpp
    C:\Qt\qt\bin\moc.exe [moc options2] ..\diagramscene\diagramtextitem.h -o tmp\moc\release_shared\moc_diagramtextitem.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\moc_diagramtextitem.o tmp\moc\release_shared\moc_diagramtextitem.cpp
    c:\Qt\qt\bin\rcc.exe -name diagramscene ..\diagramscene\diagramscene.qrc -o tmp\rcc\release_shared\qrc_diagramscene.cpp
    g++ [g++ options2] -o tmp\obj\release_shared\qrc_diagramscene.o tmp\rcc\release_shared\qrc_diagramscene.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\diagramscene.exe object_script.diagramscene.Release -L"c:\Qt\qt\lib" -L"c:\Qt\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
    mingw32-make[1]: Leaving directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    mingw32-make: Leaving directory `C:/Qt/qt/examples/graphicsview/diagramscene-build-desktop'
    The process "C:/Program Files/MinGW/bin/mingw32-make.exe" exited normally.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Unacceptable build time

    Quote Originally Posted by Phyll View Post
    So you effectively suppose that compiling a relatively simple example Qt application can took 1 hour. That's an absurd.
    Of course not.
    Building such a simple application takes only a second.

    Does it take so much time for eveything you compile in Qt Creator?

  5. #5
    Join Date
    Jul 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unacceptable build time

    Quote Originally Posted by tbscope View Post
    Does it take so much time for eveything you compile in Qt Creator?
    Today I compiled the Drag and Drop Puzzle Example - it took 30 min (14:16 build started, 14:46 build ended).
    Yesterday I compiled the Colliding Mice Example - it took about 57 min.

  6. #6
    Join Date
    Jul 2010
    Posts
    53
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unacceptable build time

    if you say
    The CPU time of Qt Creator after the end of the build was 1 min 14 s
    then this may be your win32-g++ problem i think

  7. #7
    Join Date
    Jul 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unacceptable build time

    I tried to compile the Elastic Nodes Example - it took about 76 min. During most part of this time Qt Creator:
    • does not consume noticeable amount of CPU resources.
    • very slowly consumes additional memory.
    • does not start processes - I watched it in Process Explorer.
    • does not record activity in the Compile Output except for the message:
      "Running build steps for project elasticnodes..."


    Quote Originally Posted by GreenScape View Post
    if you say
    Quote Originally Posted by Phyll View Post
    The CPU time of Qt Creator after the end of the build was 1 min 14 s
    then this may be your win32-g++ problem i think
    I don't see how the CPU time of Qt Creator (which depends on the used CPU) implies likely problem in g++.
    The g++ version is: gcc version 3.4.5 (mingw-vista special r3).

    Is there someone in this forum who can give more rational suppositions?

  8. #8
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Unacceptable build time

    I had one, but the insults being slung by someone ostensibly looking for help made me decide to keep it to myself.

  9. #9
    Join Date
    Jul 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unacceptable build time

    I found a reason for the delays and filled two reports about this. When running Qt Creator with Normal priority some of its threads run with Base priority 1 (which corresponds to Thread priority level THREAD_PRIORITY_IDLE). This means that the threads of other processes will likely have higher priority (even threads belonging to Low priority processes). So if there is computationally intensive process it will likely block or severely delay the Qt Creator tasks performed by the low priority threads (e.g. Parsing and Indexing tasks). This scenario is more evident on single core processors.

    The system can increase the priority of threads by changing their Dynamic priority (which never falls below the Base priority), but this is subject to conditions and it may be disabled.

    This screenshot (obtained from Process Explorer) illustrates the problem:

    A workaround for this issue is to increase the priority of the affected threads for example with SetPriority from http://gilchrist.ca/jeff/ as follows:

    1. Obtain the PID of the Qt Creator process (<PID>) for example with:
      tasklist /fi "ImageName eq qtcreator.exe"
    2. SetPriority.exe -t0 <PID>
    3. If Qt Creator stops again go to step 2


    The second step will set the Thread priority level of all Qt Creator threads to THREAD_PRIORITY_NORMAL. To check the priority of the Qt Creator threads: SetPriority.exe –g <PID>
    If particular Qt Creator task appears stagnant and there is a thread with priority -15 try step 2.

    I do not guarantee that the above procedure is safe – if Qt Creator freezes permanently or crashes (although in my testing this didn’t happen) and you lose a work as a result of this I am not responsible.

    Quote Originally Posted by SixDegrees View Post
    I had one, but the insults being slung by someone ostensibly looking for help made me decide to keep it to myself.
    A possible reason to feel offended is the possibility that you had nothing worthwhile to add to the issue. Another possible reason is that you care more for the group in which you belong and your place in it than Qt Creator.

Similar Threads

  1. Replies: 1
    Last Post: 25th June 2010, 18:31
  2. QMake static and shared build at the same time
    By rubenvb in forum Qt Tools
    Replies: 2
    Last Post: 20th March 2010, 08:41
  3. Replies: 1
    Last Post: 13th January 2010, 23:35
  4. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 09:49
  5. check the time of last time keyboard is pressed
    By Aki Tomar in forum General Programming
    Replies: 2
    Last Post: 5th February 2008, 09:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.