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

Qt WebEngine page print preview uses extreme amount of RAM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.11, 6.4.0
    • WebEngine
    • None
    • Linux/X11

    Description

      Using 1.2 GB to preview an 11 KiB file is excessive.

      Steps to reproduce:

      1. Generate an HTML file using the attached script:
        ./generate_html.sh test.html 1000
        
      2. Load the generated file in place of data/index.html in the WebEngine Widgets PrintMe Example.
      3. Start monitoring RAM used by the printme process in a system monitor.
      4. Press Ctrl+P.

      Actual results: RAM usage grows from less than 100 MiB to 1.3 GiB after the 4th step - both in Qt 5 and Qt 6 versions, in Debug and Release modes. A two times large file (pass 2000 to generate_html.sh) makes printme use 2.5 GiB of RAM.

      Expected results: several MiB, not GiB should be used by such a preview.

      Note: using a high-resolution printer for the preview in the printme example exacerbates the problem greatly: 2.1 GiB of RAM for a 100-number (10 times smaller) file.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              vedg Igor Kushnir
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes