Results 1 to 6 of 6

Thread: Problem: the Application Takes very long time to build

  1. #1
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem: the Application Takes very long time to build

    i have an app but some time it builds well and many time takes very very long time to build
    i consume almost the processor time and it task manager i found that
    there are many mingw32-make.exe
    what is the reason and solution for this problem ??

  2. #2
    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: Problem: the Application Takes very long time to build

    A possible reason:
    A virus killer/spyware killer that is far too active.

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem: the Application Takes very long time to build

    It also depends on the size of your project and if you are re-building or just building.
    With Qt even medium sized project on not very fast system can take some time to compile as the moc'ing also comes in.

    When you rebuild, then all the temp fails, objects etc are deleted, and then everything needs to be compiled and built from the start again.
    If you just changed something in a source file (not so with headers) then only that compilation unit will be compiled and linked to the already existing objects, which is much faster.

    What tbscope mentioned is of course possible as well.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem: the Application Takes very long time to build

    Another way to improve compilation is to build header files in smart way.
    If it is only possible do not include header file from other header file just add forward declaration of class which is needed. This will speed up header file processing.

  5. #5
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem: the Application Takes very long time to build

    first it is small project (6 forms and some classes)
    i have avira anti virus
    but i some time build fast as expected and many time didn't build but i wait it for long time
    i can include my project if you interested to see it
    thank you for your help

  6. #6
    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: Problem: the Application Takes very long time to build

    When a project sometimes compiles fast and sometimes very slow, it most likely is not the compiler or the linker or any other tool used while building. There is a small change it is, but most likely it is a slowdown caused by other software. An indexer running in the background might slow it down, a virus killer, other tools accessing the files the compiler and linker need, ...

    The biggest bottleneck in most home computers is I/O, and more specific the hard disk.When an indexer or virus killer is scanning the system, it looks for new files. It also might have some other restrictions to scan certain files, like timers etc... When scanning a file, a program might create a lock on those files, preventing the compiler or linker to proceed until the lock has been removed.

    One suggestion is to build all the software in a specific folder. Then, in the index, virus killer, etc... set up this folder so it doesn't get scanned (if possible of course).

Similar Threads

  1. QTextEdit loading takes long time
    By sreedhar in forum Qt Programming
    Replies: 12
    Last Post: 21st March 2011, 10:29
  2. Replies: 2
    Last Post: 5th October 2010, 08:20
  3. [QTableWidget] clearing a big table takes so long!
    By punkypogo in forum Qt Programming
    Replies: 4
    Last Post: 5th August 2010, 13:52
  4. QImage::scaled takes long time
    By nrabara in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2009, 12:19
  5. QGraphicsItem.setPos takes a lot of time
    By ricofe25 in forum Qt Programming
    Replies: 2
    Last Post: 8th December 2009, 19:28

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.