Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How use mainThread in Qt to run a Big Data algorithm?

How use mainThread in Qt to run a Big Data algorithm?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 683 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stackprogramer
    wrote on 26 May 2017, 19:23 last edited by stackprogramer
    #1

    Hello my friend, i had a big data algorithm,that with out thread with corei5 cpu intel it work nice and realtime.
    i want to add interface UDP to read data and send to algorithm to calculate data,and again send a other ip on UDP.
    we use three thread in Qt:
    Thread One:
    Buffering Data that received from UDP......
    Thread Two:
    we used this thread for calculate algorithm......
    Thread Three:
    we send Data mining to UDP socket out..........
    but thread for algorithm is so slow, it can not work with speed of data received and after filling RAM it will crashed.........

    My Question is:
    i think mainThread is (main.cpp) is idle (my code is console without GUI),How i can used mainthread to running this algorithm or helo to other Thread Two that work faster....
    any idea?
    i had a function of algorithm that i used it, i can not create multithread of algorithm.........
    i want use any other idea........
    thanks

    int main(){
    .........
    return a.exec
    
    }
    

    my code QThread is same below link:
    http://www.bogotobogo.com/Qt/Qt5_QThreads_Creating_Threads.php

    http://www.bogotobogo.com/Qt/Qt5_QtConcurrent_RunFunction_QThread.php

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 May 2017, 22:11 last edited by
      #2

      Hi,

      Did you determine what makes that thread slow ?

      Just moving the code around won't make it faster. Find the hot spots and see if you can improve the throughput there.

      Otherwise you might also need to have a more powerful machine to run your algorithms.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        stackprogramer
        wrote on 27 May 2017, 05:01 last edited by stackprogramer
        #3

        @SGaist thanks for reply i will examine more and will share result

        1 Reply Last reply
        0

        3/3

        27 May 2017, 05:01

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved