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

Changing text for Text with MarkdownText seems expensive (but only the second and later time?)

    XMLWordPrintable

Details

    Description

      The idea of using MarkdownText to show tables came up when enhancing the DebugView item of Qt Quick 3D.

      Here we found that changing the text of the Text in the ScrollView becomes prohibitively expensive. Everything hangs for seconds basically when the markdown text defines a table with more than just a few rows, and that strings gets set in the text property.

      Attached is a standalone example. Click on the second tab, then back, the animation and everything stops for a considerable amount of time every time the first tab becomes active.

      What I found odd is that when launching the application there seems to be no delay, but when switching back to the first tab for the second time or later, it hangs longer than it took to start the whole application up.

      We have implemented it so that changing the current tab changes the text. Mitigation is of course possible by using multiple Text items (i.e. one per tab and toggling their visibility), but that does not solve the problem in the real world because the strings DebugView wants to show will need to change from time to time and we cannot afford to block everything just to get the debug output updated.

      Here is something from VTune. It only tells that shaping and layouting is expensive, I suppose. But is this as expected or is there something too expensive happening in there?

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            lagocs Laszlo Agocs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes