Results 1 to 7 of 7

Thread: how to compile gui faster

  1. #1
    Join Date
    Aug 2013
    Location
    India
    Posts
    44
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default how to compile gui faster

    hey all, i made a gui in qt actuallty i am using lots of calculation like fft, invfft, hlbrt and so on .........
    it take 9 second to plot but i want it must be plot in 1 second. plzzz help me how to do this.
    thanks in advance

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to compile gui faster

    Let me see... my crystal ball tells me that you are doing too much calculation to create your "gui in qt" and you should either find a way to 1) simplify the calculation, 2) do the calculation in the background and not while painting the plot, 3) give the user some feedback that tells them the progress of the calculation, or 4) do something else.

    Alternatively, you could get someone to make you a special clock where the second hand takes 9 seconds to move a one second interval.

  3. #3
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    120
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to compile gui faster

    It's hard to give any advice when there is nearly no information on your problem available. So here are just some points that come into my mind:
    1. Make sure to compile in release mode with suitable optimization settings
    2. Identify your bottleneck: Is it the in the algorithms (fft, ...) or is it in result presentation (drawing, ...)
    3. Can you simplify some of the sequential steps of your algorithms, or, in other words: is it possible to find a specialized algorithm for solving your task instead of just combining standard algorithms
    4. As already mentioned: are there parts of your computations that can be run in parallel on different processor cores?
    5. Are you using the best implementations (libraries) in your computational stuff? As an example, there are uncountable fft implementations around (free and commercial) but there's big difference in runtime
    6. Have you done some complexity analysis of your problem and does your implementation follow the results of such analysis?
    7. Are there any partial/preliminary results that you can save from one step in your computations to speed up the next steps, i.e. improve runtime by paying with memory?
    8. ...

  4. The following user says thank you to ars for this useful post:

    prabhatjha (27th May 2015)

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to compile gui faster

    Quote Originally Posted by d_stranz View Post
    Let me see... my crystal ball tells me that you are doing too much calculation to create your "gui in qt" and you should either find a way to 1) simplify the calculation, 2) do the calculation in the background and not while painting the plot, 3) give the user some feedback that tells them the progress of the calculation, or 4) do something else.

    Alternatively, you could get someone to make you a special clock where the second hand takes 9 seconds to move a one second interval.
    Or you can buy a faster computer
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Aug 2013
    Location
    India
    Posts
    44
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to compile gui faster

    Thanx a lot to everyone to giving suggession...
    Actually right now i am mentioning what i am doing and whats will be the algo flow.
    I am getting data from user on every second so i made a timer which time interval is 1 second.
    in timer i am calling a function name simulation which will simulate all data from user and calculate fft, invfft, demon,welch,noise reduction,hosa and there are too many function which is calling in simulation function.but due to lots of function is calling in simulation it is taking 8-9 second for completion.so anyone can help me how i can do this all calculation that it will take 1 sec max for all calculation.
    Last edited by wysota; 27th May 2015 at 14:44.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to compile gui faster

    I opt for:

    Quote Originally Posted by d_stranz
    1) simplify the calculation
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to compile gui faster

    calculate fft, invfft, demon,welch,noise reduction,hosa and...
    Is it absolutely required that you do this once a second, every second? If you can't simply the calculation, then you simply can't do it once a second if it takes 8 - 9 seconds total.

    If the calculations are a pipeline (fft -> ifft -> demon -> ...) then the best you can do is to try to find multi-threaded versions of these computational steps. If the steps are not in a pipeline, then you could perform all of them in parallel using threads.

    If you want to get into writing GPU / CUDA code, then this would probably be the fastest way to do it, either in series or in parallel. In my experience with CUDA code, you can speed up calculations by orders of magnitude by moving them off the CPU and into the GPU. The Nvidia CUDA web site has GPU-based FFT code in addition to other numerical algorithms.

    Finally, you can investigate the Intel Performance Primitives library. I use this for FFT calculations.

Similar Threads

  1. What should be faster: csv, json or xml?
    By Momergil in forum Qt Programming
    Replies: 3
    Last Post: 9th March 2014, 20:14
  2. a faster QSqlQueryModel::data()
    By baray98 in forum Qt Programming
    Replies: 0
    Last Post: 24th September 2009, 00:56
  3. Faster paintEvent
    By SailinShoes in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2008, 15:25
  4. Faster code possible?
    By ShaChris23 in forum General Programming
    Replies: 1
    Last Post: 28th May 2008, 07:35
  5. faster QScrollView
    By firas in forum Qt Programming
    Replies: 2
    Last Post: 29th April 2006, 18:49

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.