Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34145

QTextEdit (QTextBrowser) large memory consuming

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.1.1
    • GUI: Text handling
    • None
    • Win 7 x64, MSVC 2012 x86, GCC 4.8.1 x86

    Description

      Here is the case to represent this strange behavior:

      • take a large txt file (plain text, ~2-3Mb). We use "War and Peace" book txt version, with ~47K blocks inside (every line is a text block).
      • open it somewhere to copy and then paste to QTextEdit.
      • the size of app is expanded from 4Mb to 50Mb, it's ok.
      • finally click "Eat memory" button, which is connected to the test slot.
      • we have about 250Mb app now, too much, isn't it?
        The example slot does nothing, we have much more complicated logic, but we use these looking-through-blocks loops.
        We have attached test project and war_and_peace.txt file, so you can easily check out this issue.

      Attachments

        1. CustomWidget.cpp
          0.6 kB
          Igor Bilyk
        2. CustomWidget.h
          0.4 kB
          Igor Bilyk
        3. CustomWidget.ui
          2 kB
          Igor Bilyk
        4. main.cpp
          0.2 kB
          Igor Bilyk
        5. precompile.h
          0.1 kB
          Igor Bilyk
        6. test.pro
          0.5 kB
          Igor Bilyk
        7. war_and_peace.txt
          3.05 MB
          Igor Bilyk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            igor.bilyk Igor Bilyk
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes