Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFile save for usb drive
Qt 6.11 is out! See what's new in the release blog

QFile save for usb drive

Scheduled Pinned Locked Moved Unsolved General and Desktop
31 Posts 6 Posters 21.4k 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.
  • S samdol

    @jsulm
    I need to develop a stand alone application which requires static build of Qt. I could do with Qt 5.6.2 but I could not do it anymore for 5.7.1. I don't know whether there is big change between them.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #20

    @samdol Why don't you build Qt 5.9.1? This is the latest version. If you say you have errors while compiling you should say which errors and which compiler you're using.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    S 1 Reply Last reply
    0
    • jsulmJ jsulm

      @samdol Why don't you build Qt 5.9.1? This is the latest version. If you say you have errors while compiling you should say which errors and which compiler you're using.

      S Offline
      S Offline
      samdol
      wrote on last edited by
      #21

      @jsulm
      I could not use Qt 5.9.1 as a commercial version because my license has expired.
      I downloaded Qt 5.7.1 and configured by
      configure -prefix C:\Qt\5.7.1 -static -release -platform win32-g++ -no-compile-examples -opengl desktop
      and then
      mingw32-make
      After several hours(Slow machine), I met the following error message
      In file included from release\statemachine.cpp:7:0:
      release\statemachine.h:10:30: fatal error: QScxmlStateMachine: No such file or directory
      #include <QScxmlStateMachine>
      ^
      compilation terminated.
      Makefile.Release:135: recipe for target '.obj/release/statemachine.o' failed.

      This is quite strange, because when I compile Qt 5.6.2 with the same options, It could compile well. I used mingw4.9.3 and mingw7.1 but the results are the same.

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

        If you have a slot machine then you should avoid building modules you don't use. That will be a gain of time and space. You can always build additional modules on demand.

        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
        • mrjjM mrjj

          @samdol

          Hi
          Can't you just grap it directly then ?
          https://download.qt.io/official_releases/qt/5.9/5.9.1/

          Or something Im missing?

          S Offline
          S Offline
          samdol
          wrote on last edited by samdol
          #23

          @mrjj

          Following the instruction by
          http://dimitris.apeiro.gr/2015/06/24/build-a-static-qt5-for-windows-by-compiling/
          I could compile Qt 5.7.1. It seems some of configure options were not correct. I'll check it out more closely.
          So I prepared a Qt 5.7.1 in windows 10 and when I run on_pushButton_2_released() by mrjj, it still shows poor performance. It takes 24 seconds for 10000 files on usb 2.0 drive. Now I am getting confused. Before I thought because Qt 5.6.2 is slow for entryList of files in usb. But changing Qt 5.7.1 did not improve much. If it is the problem of usb stick, accessing file should be slow with other programs. But other programs could access files on this usb very quickly.

          mrjjM 1 Reply Last reply
          0
          • S samdol

            @mrjj

            Following the instruction by
            http://dimitris.apeiro.gr/2015/06/24/build-a-static-qt5-for-windows-by-compiling/
            I could compile Qt 5.7.1. It seems some of configure options were not correct. I'll check it out more closely.
            So I prepared a Qt 5.7.1 in windows 10 and when I run on_pushButton_2_released() by mrjj, it still shows poor performance. It takes 24 seconds for 10000 files on usb 2.0 drive. Now I am getting confused. Before I thought because Qt 5.6.2 is slow for entryList of files in usb. But changing Qt 5.7.1 did not improve much. If it is the problem of usb stick, accessing file should be slow with other programs. But other programs could access files on this usb very quickly.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #24

            @samdol
            Hi
            Can you possible try the USB stick + program on other computer?
            Win 10 if possible.

            You are right to think there is something fishy. If it was the device, explorer should be slow too.

            So i do wonder.

            S 1 Reply Last reply
            0
            • mrjjM mrjj

              @samdol
              Hi
              Can you possible try the USB stick + program on other computer?
              Win 10 if possible.

              You are right to think there is something fishy. If it was the device, explorer should be slow too.

              So i do wonder.

              S Offline
              S Offline
              samdol
              wrote on last edited by samdol
              #25

              @mrjj

              When I run on_pushButton_2_released() to access the directory with 10000 files on hard disk it took less than a second. But accessing the same directory on usb 2.0 stick takes 53 seconds. I also tried QDirIterator but the results are the same. So I run the code in another machine with windows 10 to the same usb stick, no difference. Did it take less than a second when you access the directory with 10000 files on usb 2.0 stick?

              mrjjM 1 Reply Last reply
              0
              • S samdol

                @mrjj

                When I run on_pushButton_2_released() to access the directory with 10000 files on hard disk it took less than a second. But accessing the same directory on usb 2.0 stick takes 53 seconds. I also tried QDirIterator but the results are the same. So I run the code in another machine with windows 10 to the same usb stick, no difference. Did it take less than a second when you access the directory with 10000 files on usb 2.0 stick?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #26

                @samdol
                Hi
                I tried Qt5.7 static and its maximum 1.2 sec on the oldest usb stick i could find.
                win 10
                alt text

                But inside virtual win 7.
                alt text
                Pretty slow. Explorer show it instantly.

                I wish i had an other win 7 to try on.

                S 1 Reply Last reply
                1
                • mrjjM mrjj

                  @samdol
                  Hi
                  I tried Qt5.7 static and its maximum 1.2 sec on the oldest usb stick i could find.
                  win 10
                  alt text

                  But inside virtual win 7.
                  alt text
                  Pretty slow. Explorer show it instantly.

                  I wish i had an other win 7 to try on.

                  S Offline
                  S Offline
                  samdol
                  wrote on last edited by
                  #27

                  @mrjj
                  Thank you for pictures. That is interesting. Does it mean Qt does not support well usb access for windows 7 and support well for windows 10? But my windows10 also shows poor performance. Do you think I have to try with 5.7.0 instead of 5.7.1?

                  E mrjjM 2 Replies Last reply
                  0
                  • S samdol

                    @mrjj
                    Thank you for pictures. That is interesting. Does it mean Qt does not support well usb access for windows 7 and support well for windows 10? But my windows10 also shows poor performance. Do you think I have to try with 5.7.0 instead of 5.7.1?

                    E Offline
                    E Offline
                    Eeli K
                    wrote on last edited by Eeli K
                    #28

                    @samdol Maybe you could try to make a minimal program, nothing but the slow operation inside main(), and do profiling for it. It could reveal where the time is spent.

                    Edit: I mean real profiling, not just timing output.

                    1 Reply Last reply
                    0
                    • S samdol

                      @mrjj
                      Thank you for pictures. That is interesting. Does it mean Qt does not support well usb access for windows 7 and support well for windows 10? But my windows10 also shows poor performance. Do you think I have to try with 5.7.0 instead of 5.7.1?

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by mrjj
                      #29

                      @samdol

                      Im not sure what it means.
                      The exact same program runs much faster in win 10.

                      I would need a non virtual win 7 and test with to make sure its not related to being virtual.

                      But qdir.entryList does seems very slow (on win 7) and its not repeatable with other utils or explorer.

                      I will install Qt in the win 7 and see directly from creator.

                      Update:
                      To install 5.9 i installed service pack 1 for win 7
                      The old static compiled test program no longer takes a long time.

                      The pc you are testing on, what service pack is that ?

                      I think this is related to win 7 non service pack so make sure you have a fully patched system.

                      S 1 Reply Last reply
                      1
                      • mrjjM mrjj

                        @samdol

                        Im not sure what it means.
                        The exact same program runs much faster in win 10.

                        I would need a non virtual win 7 and test with to make sure its not related to being virtual.

                        But qdir.entryList does seems very slow (on win 7) and its not repeatable with other utils or explorer.

                        I will install Qt in the win 7 and see directly from creator.

                        Update:
                        To install 5.9 i installed service pack 1 for win 7
                        The old static compiled test program no longer takes a long time.

                        The pc you are testing on, what service pack is that ?

                        I think this is related to win 7 non service pack so make sure you have a fully patched system.

                        S Offline
                        S Offline
                        samdol
                        wrote on last edited by samdol
                        #30

                        @mrjj
                        Maybe you are correct. It could be related to windows service pack update. I did not apply update to my windows because the machine is not connected to internet. I will figure it out how to download from other machine and copy it to that. Thank you for details.

                        mrjjM 1 Reply Last reply
                        0
                        • S samdol

                          @mrjj
                          Maybe you are correct. It could be related to windows service pack update. I did not apply update to my windows because the machine is not connected to internet. I will figure it out how to download from other machine and copy it to that. Thank you for details.

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #31

                          @samdol
                          I hope you get same result :)
                          You can download sp 1 as a file and move to other machine.

                          1 Reply Last reply
                          1

                          • Login

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