This issue has been created
There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e4f3a594-8bd2-491c-9411-42f675775149 XWIKI-25696 Open

Live Data cells leak an edit bus listener each time they are displayed

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-27ca0d4b-62f2-4ac8-9ff8-536918c38462 Manuel Leduc created this issue on 09/Nov/26 14:55
 
Summary: Live Data cells leak an edit bus listener each time they are displayed
Issue Type: cid:jira-generated-image-avatar-e4f3a594-8bd2-491c-9411-42f675775149 Bug
Affects Versions: 17.4.0
Assignee: Unassigned
Components: Live Data
Created: 09/Nov/26 14:55
Priority: cid:jira-generated-image-static-major-e988f48e-b2e1-467c-95c6-c41a6a34cfb0 Major
Reporter: Manuel Leduc
Description:

Each Live Data cell registers a listener on the edit bus when it is mounted (BaseDisplayer.vue, logic.getEditBus().onAnyEvent(...)) and never removes it. EditBusService has no way to unregister a listener.

Consequences

  • Every page change, sort or filter that displays new rows adds one permanent listener per displayed cell. With 15 rows and 6 columns, 10 page changes leave about 900 listeners.
  • The listeners keep the unmounted cell components reachable, so they are never garbage collected.
  • Every edit event (start, cancel, save) calls all the listeners ever registered, so inline editing gets slower the longer the user browses the Live Data.

Steps to reproduce

  1. Open a page with a Live Data, for instance the document index.
  2. Navigate between pages of the Live Data several times.
  3. Take a heap snapshot: the detached BaseDisplayer instances stay alive, held by the edit bus listeners.

Expected: a cell removes its listener when it is unmounted.

 
 

3 updates

 
cid:jira-generated-image-avatar-27ca0d4b-62f2-4ac8-9ff8-536918c38462 Changes by Manuel Leduc on 09/Nov/26 14:55
 
Fix Version: 18.4.9
Fix Version: 17.10.15
Fix Version: 18.10.0-rc-1