This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-8817cb72-9930-4a00-9517-bcfcd0f84230 XWIKI-25698 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-f70e1b54-c42e-4efa-a347-2831c8208f1f Manuel Leduc created this issue on 09/Nov/26 14:55
 
Summary: Live Data resolves the displayer of each cell separately and renders each new cell twice
Issue Type: cid:jira-generated-image-avatar-8817cb72-9930-4a00-9517-bcfcd0f84230 Improvement
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Live Data
Created: 09/Nov/26 14:55
Priority: cid:jira-generated-image-static-major-6ac7236e-6f46-47d1-b2b6-7f59ea7483a5 Major
Reporter: Manuel Leduc
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.
 
 

1 update

 
cid:jira-generated-image-avatar-f70e1b54-c42e-4efa-a347-2831c8208f1f Changes by Manuel Leduc on 09/Nov/26 14:55
 
Fix Version: 18.10.0-rc-1