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. which QtextEdit widget is most less time consuming to show 3Gb file

which QtextEdit widget is most less time consuming to show 3Gb file

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 1.9k 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    which TextEdit widget is most less time to consume to show 3Gb file. QScintilla takes less time to load 3GB file

    JonBJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      This one is fastest for text files
      http://doc.qt.io/qt-5/qplaintextedit.html

      1 Reply Last reply
      1
      • Q Qt Enthusiast

        which TextEdit widget is most less time to consume to show 3Gb file. QScintilla takes less time to load 3GB file

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @Qt-Enthusiast
        If you only wish to display the file you might use QLabel. But otherwise I would expect QPlainTextEdit is about as good as you'll get from out-of-the-box Qt. Dedicated QScintilla code may well be more efficient in all sorts of ways (e.g. for all we know it might lazy-load your file), but it's separate code. Choice depends on what you want user to be able to do with content. QScintilla is aimed at editing source code.

        1 Reply Last reply
        1
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4

          If an app loads 3GB of text in my memory it's an auto-unistall for me.

          3GB of text is 18000 Shakespeare's Hamlets. Nobody needs so much text loaded in memory

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          4
          • Q Offline
            Q Offline
            Qt Enthusiast
            wrote on last edited by
            #5

            even if the size of file is 3GB

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              Qt Enthusiast
              wrote on last edited by
              #6

              does it allow incremental loading on scroll bar movement

              JonBJ 1 Reply Last reply
              0
              • Q Qt Enthusiast

                does it allow incremental loading on scroll bar movement

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #7

                @Qt-Enthusiast

                does it allow incremental loading on scroll bar movement

                No, it doesn't even support loading from file. You would have to write that yourself.

                Have a look at https://forum.qt.io/topic/4519/how-do-i-open-large-file-on-qtextedit

                1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by mrjj
                  #8

                  Hi
                  Also could you explain why you need to load such huge file?
                  On 32 bit system it will leave very little mem for rest of app.

                  jsulmJ 1 Reply Last reply
                  0
                  • Q Offline
                    Q Offline
                    Qt Enthusiast
                    wrote on last edited by
                    #9

                    We work in such files where log file are around 0.3 GB files and we have to show text editor

                    mrjjM jsulmJ 2 Replies Last reply
                    0
                    • Q Qt Enthusiast

                      We work in such files where log file are around 0.3 GB files and we have to show text editor

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

                      @Qt-Enthusiast
                      ok so its only to show log files and not actually edit them?

                      1 Reply Last reply
                      0
                      • mrjjM mrjj

                        Hi
                        Also could you explain why you need to load such huge file?
                        On 32 bit system it will leave very little mem for rest of app.

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

                        @mrjj said in which QtextEdit widget is most less time consuming to show 3Gb file:

                        On 32 bit system it will leave very little mem for rest of app.

                        On Windows 32bit an app has 2GB at most as far as I know.

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

                        1 Reply Last reply
                        2
                        • Q Qt Enthusiast

                          We work in such files where log file are around 0.3 GB files and we have to show text editor

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

                          @Qt-Enthusiast said in which QtextEdit widget is most less time consuming to show 3Gb file:

                          We work in such files where log file are around 0.3 GB files and we have to show text editor

                          I don't get it: is it 3GB or 0.3GB?

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

                          JonBJ 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @Qt-Enthusiast said in which QtextEdit widget is most less time consuming to show 3Gb file:

                            We work in such files where log file are around 0.3 GB files and we have to show text editor

                            I don't get it: is it 3GB or 0.3GB?

                            JonBJ Offline
                            JonBJ Offline
                            JonB
                            wrote on last edited by JonB
                            #13

                            @jsulm
                            It seems to vary, what does a factor of 10 matter :) But either way it's "big" enough to cause OP time problems, so the question is valid.

                            jsulmJ 1 Reply Last reply
                            0
                            • JonBJ JonB

                              @jsulm
                              It seems to vary, what does a factor of 10 matter :) But either way it's "big" enough to cause OP time problems, so the question is valid.

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

                              @JonB I did not say the question is invalid. But if one is asking a question he/she should provide consistent information. And loading 3GB of data is not the same as loading 300MB, especially not on 32bit systems. If you want to load 3GB of data you should consider memory mapped file IO to avoid consuming too much RAM or even crashing your app.

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

                              1 Reply Last reply
                              4

                              • Login

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