Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. 2-3 secs Delay when SqlRecord is Executing
Forum Updated to NodeBB v4.3 + New Features

2-3 secs Delay when SqlRecord is Executing

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
17 Posts 3 Posters 2.9k Views 2 Watching
  • 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.
  • B Offline
    B Offline
    Beemaneni Bala
    wrote on last edited by
    #8

    I have my threads running apart from this. this happens when i try to insert a record, it blocks all threads as well and it takes 5 secs to come back from exec()

    1 Reply Last reply
    0
    • SGaistS SGaist
      1. What is the current size ? Also, you plan to work on sqlite files in the TeraByte size ?
      2. What are you using as mass storage device ? SSD ? Mechanical hard drive ? etc.
      3. What speed ? Architecture ?
      B Offline
      B Offline
      Beemaneni Bala
      wrote on last edited by
      #9

      @SGaist

      1. It is a fresh database of 20 to 30 KB. and we limited the size to some 300 to 400 MB file.
      2. Hard drive with 256 MB.
      3. 1GHz arm processor
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #10

        What do the other threads do when you are blocking them before writing the record ?

        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
        0
        • B Offline
          B Offline
          Beemaneni Bala
          wrote on last edited by
          #11

          The other thread shud have the serial communication that interacts with the other module.Even that is blocked during that time. Does exec() function runs in loop until it saves all the records. ?

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Beemaneni Bala
            wrote on last edited by
            #12

            There are 2 threads one is main and other is communication thread. So database manager is a member of main thread. So when comm thread emits a signal, it is caught in main thread and the records are inserted into database. Thats how it goes for now

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #13

              Are you doing anything heavy in the GUI thread ?

              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
              0
              • B Offline
                B Offline
                Beemaneni Bala
                wrote on last edited by
                #14

                Nope..Onr thing i dont understand is only at that point (when exec() is called ) alone i have that lag. If i just comment that , it works perfect.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #15

                  Nothing else is accessing that database ? Even an external process ?

                  How is insertHealthStatusDetails called ?

                  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
                  0
                  • B Offline
                    B Offline
                    Beemaneni Bala
                    wrote on last edited by
                    #16

                    So to answer all the questions...Here i go sir.
                    I have created a test app for inserting a record into database. I compiled for device and i ran on that and it gives me same results.Hence i am not worried about all the processes and threads for now.
                    Am i correct ?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #17

                      Looks like there's something else at play.

                      I'd check with a profiler to see where's the bottleneck.

                      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
                      0

                      • Login

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