Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25698

Live Data resolves the displayer of each cell separately and renders each new cell twice

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • 18.10.0-rc-1
    • 17.10.0
    • Live Data
    • None
    • Unknown

    Description

      Every Live Data cell resolves its displayer on its own:

      • LivedataDisplayer loads its displayer component in an asynchronous mounted() hook, so each new cell first renders empty, then renders a second time once the promise resolves.
      • Each cell computes its displayer id and configuration through getPropertyDescriptor, getPropertyTypeDescriptor and getDisplayerDescriptor, which search the property descriptors and deep-merge the displayer configuration (jsonMerge, a JSON round trip) for every cell, while the result is the same for the whole column.
      • Each row recomputes the list of property descriptors.

      Measured on 18.10.0-SNAPSHOT with a Live Data over 300 XObjects, 8 columns, 100 rows per page, production bundle, main-thread time only (server time excluded).

      • A page change mounts 3400 components and then performs 1611 component updates. The 1600 updates are the second render of each new cell.
      • Descriptor lookups and jsonMerge take about 30 ms of the about 590 ms page change.

      Proposal

      • Resolve the displayer id, the merged configuration and the displayer component once per property, cached by LiveDataLogic and invalidated when the meta data changes.
      • Render the displayer synchronously from that cache.
      • Compute the visible property descriptors once in the layout instead of once per row.

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: