×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    30

    compiling for symbian device takes 'ages'

    I'm developing an Application for Symbian^3 (N8/C6) and using the Qt Creator 2.1 RC, QT 4.7 and Windows XP Pro (P4 / 2.4 Ghz).

    To test de logic and simple UI controls I can use the simulator but if I want to test my application on a real device to see the real UI it takes about 5 minutes (!) to compile the project.
    Sometimes the changes I made are not even compiled and the application on the device is still the old one....

    After changing 1 bit in the code the compiler starts over again and I have to wait another 5 minutes with the effect that my coffee consumption is getting sky high ;-)

    Till now the project has only 9 forms and a couple of logic files.

    Is someone else having the same problem and how can I speed up this process?

    thanks!

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: compiling for symbian device takes 'ages'

    Fairly highly dependent on the speed (both disk and CPU) of your development system. But I have an app (over 100 screens) that takes 20 minutes to build on a fairly fast laptop.

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    30

    Re: compiling for symbian device takes 'ages'

    Quote Originally Posted by danhicksbyron View Post
    20 minutes
    Are you serious

    It remember to the 'old times', where we had to start a night build before we went home and discover the next morning that someone had forgot a ";" ......

    But serious, is the reason Qt, Symbian of the combination of Symbian and Qt and how can we speed up this process without going to the computerstore?

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: compiling for symbian device takes 'ages'

    Serious, but it's a big application -- 127K lines of C++.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    33

    Re: compiling for symbian device takes 'ages'

    Quote Originally Posted by deepweb View Post
    I'm developing an Application for Symbian^3 (N8/C6) and using the Qt Creator 2.1 RC, QT 4.7 and Windows XP Pro (P4 / 2.4 Ghz).

    To test de logic and simple UI controls I can use the simulator but if I want to test my application on a real device to see the real UI it takes about 5 minutes (!) to compile the project.
    Sometimes the changes I made are not even compiled and the application on the device is still the old one....

    After changing 1 bit in the code the compiler starts over again and I have to wait another 5 minutes with the effect that my coffee consumption is getting sky high ;-)

    Till now the project has only 9 forms and a couple of logic files.

    Is someone else having the same problem and how can I speed up this process?

    thanks!
    I am. I did a little benchmarking for a project I am working in.

    For compiling for Linux/Maemo, its takes about 20 seconds.
    For compiling for Symbian, it takes about 35 mins.
    Do note that I am using an AMD Phenom II X4 940 Processor!

    The 5 mins appears to be this overhead in which the "make" system tries to figure out what it has to recompile. More files, no matter how small they are, the longer the overhead takes. Also, the more "includes" you have, the overhead seems to take longer. Good to know that other people are having issues!

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: compiling for symbian device takes 'ages'

    Yep, often I think the thing spends more time deciding what not to compile that it would spend compiling it.

  7. #7
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: compiling for symbian device takes 'ages'

    It remember to the 'old times', where we had to start a night build before we went home and discover the next morning that someone had forgot a ";" ......
    Just be thankful that we no longer have to walk to the computer center two blocks away, lugging two boxes of cards.

  8. #8
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    Re: compiling for symbian device takes 'ages'

    Quote Originally Posted by deepweb View Post
    I'm developing an Application for Symbian^3 (N8/C6) and using the Qt Creator 2.1 RC, QT 4.7 and Windows XP Pro (P4 / 2.4 Ghz).

    To test de logic and simple UI controls I can use the simulator but if I want to test my application on a real device to see the real UI it takes about 5 minutes (!) to compile the project.
    Sometimes the changes I made are not even compiled and the application on the device is still the old one....

    After changing 1 bit in the code the compiler starts over again and I have to wait another 5 minutes with the effect that my coffee consumption is getting sky high ;-)

    Till now the project has only 9 forms and a couple of logic files.

    Is someone else having the same problem and how can I speed up this process?

    thanks!
    Simple applications can compile in 30 secs for me.

    I can see very large applications taking for ever to compile. . .I've been on projects where the code base takes 1 hr+ to compile from scratch....

  9. #9
    Registered User
    Join Date
    Sep 2010
    Posts
    30

    Re: compiling for symbian device takes 'ages'

    Thanks for the input!

    It looks like the 5 minutes is 'normal' or even short, so I have to get used to it and find better coffee

    I'm wondering if it's possible to use Precompiled Headers with qmake?

  10. #10
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    Re: compiling for symbian device takes 'ages'

    Quote Originally Posted by TejWC View Post
    The 5 mins appears to be this overhead in which the "make" system tries to figure out what it has to recompile. More files, no matter how small they are, the longer the overhead takes. Also, the more "includes" you have, the overhead seems to take longer. Good to know that other people are having issues!
    try to avoid #include <QtGui> in each header/cpp
    Symbian & Qt developer. http://vladest.org

  11. #11
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: compiling for symbian device takes 'ages'

    From command prompt, if you are using the 'abld' build command (which 'make' calls), for small changes you might want to call abld target <target> <urel|udeb>.

    So, instead of 'make winscw-udeb', you'd type 'abld target winscw udeb'.

  12. #12
    Registered User
    Join Date
    Sep 2010
    Posts
    30

    Smile Re: compiling for symbian device takes 'ages' -> and now seconds

    The following actions reduced my compiling time with about 75% (from 5 minutes to about 90 seconds)
    - Removing unnecessary header files <QtGui> ...
    - Move the stylesheet code from the different forms to the main form
    - Clean-up the project

    Thanks for all tips!

  13. #13
    Registered User
    Join Date
    Nov 2007
    Location
    Espoo, Finland
    Posts
    25

    Re: compiling for symbian device takes 'ages'

    try to avoid #include <QtGui> in each header/cpp
    You should also prefer forward declaration instead of including classes in the header file. In case of big project using forward declaration can significantly shorten build time.

    Here is an example:

    if you have mainwindow.h like this:

    Code:
    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    #include <QLineEdit>
    
    class MainWindow : public QMainWindow
    {
        Q_OBJECT
    
    public:
        explicit MainWindow(QWidget *parent = 0);
    
    private:
        QLineEdit *m_lineEdit;
    }
    
    #endif
    You can use forward declaration and change mainwindow.h to this:

    Code:
    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    class QLineEdit;
    
    class MainWindow : public QMainWindow
    {
        Q_OBJECT
    
    public:
        explicit MainWindow(QWidget *parent = 0);
    
    private:
        QLineEdit *m_lineEdit;
    }
    
    #endif
    Now QLineEdit is forward declared, you can do that because m_lineEdit is a pointer.

    You also now need to include QLineEdit in the mainwindow.cpp:

    Code:
    #include <QLineEdit>
    Last edited by miksuh; 2010-12-19 at 21:29.

  14. #14
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: compiling for symbian device takes 'ages'

    Right. If a class is just referred to by reference (only pointers to it are used) then the include is not needed in the .h and a simple forward class definition is a much better choice.

    (Though I still don't understand why C/C++ doesn't have an #includeonce directive.)

Similar Threads

  1. Compiling QT Symbian Device Build on multi-core PC
    By DonMorr in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-09-23, 13:00
  2. NokiaQtSDK: problems compiling examples for a Symbian device
    By jsiltane in forum [Archived] Qt SDKs and Tools
    Replies: 5
    Last Post: 2010-08-31, 07:12
  3. Replies: 1
    Last Post: 2009-09-08, 17:25
  4. Replies: 2
    Last Post: 2009-04-21, 16:14
  5. ContentConnection.getLength() takes ages
    By sankotm in forum Mobile Java General
    Replies: 0
    Last Post: 2004-12-13, 16:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •