Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
17.10.0
-
None
-
Unknown
-
Description
When the Live Data fetches entries, it replaces all the entry objects with new ones, even for the rows that did not change. Vue sees a new entry prop on every row and re-renders every cell and its tooltip, although nothing visible changes.
This happens on every refresh, after an inline edit is saved, for the rows that stay displayed after a filter change, and for a sort that keeps rows on the current page.
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).
- Refresh returning the same rows: 0 mounts, 3408 component updates, about 290 ms of main-thread time.
- Same refresh on the document index with 15 rows: 338 component updates, about 33 ms.
Proposal
- Keep the entries as non-reactive snapshots (markRaw) in a shallow reactive array.
- When new entries are fetched, reuse the previous entry object when its id matches and its values are equal, so unchanged rows receive the same prop and are skipped by Vue.
- Do not make the row index part of the row's reactive render, so rows that only move are not patched.
- Entries are replaced, never mutated in place: inline edits and drafts go through LiveDataLogic.