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

Qt for WebAssembly wasm file size minimization

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Other
    • None
    • WebAssembly
    • 36ba00aa5 (dev), 0cc510226 (dev)

    Description

      Wasm file size minimization

      We’d like to find out if the size of distributed Qt applications can be made smaller, and what the minimal practical distribution size is. This can be done by fixing “code bloat” bugs to eliminate unused (false) dependencies, and also by setting configure flags which disables Qt features at Qt configure/build time.

      Wasm files are statically linked and you would expect that compiler dead code elimination would remove unused code. In practice Qt is often very dynamic with cross-cutting features which makes it so that the compiler can’t say for sure that a piece of code is not used.

      The size benchmark is the size of the wasm file built with optimizations, without debug info, and then compressed (important!). This corresponds to the effective distribution size when sending wasm files over the network (wasm file size on disk or in memory is less interesting). Uncompressed debug builds can still be used when investigating relative changes in file size. Also, debug info helps / is required for identifying which part of the code contributes to the wasm file size.

      Tasks:

      • Fix any “code bloat” bugs found.
      • Verify that Qt for WebAssembly builds with various features disabled. Fix any build errors. Prioritize features which affects file size the most, and which may not be required by “most” apps. (look at twiggy or weave output for candidates)

      Qt Configure:
      List features : ./configure -list-features
      Disable a feature : ./configure -no-feature-foo

      Attachments

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

        Activity

          People

            piwierci Piotr Wierciński
            sorvig Morten Sørvig
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes