-
Type: Task
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.0
-
Fix Version/s: 2.3.3
-
Release Notes Summary:Improved document preview performance
-
Epic Link:
-
Backlog priority:800
-
Browser:
-
Sprint:nxGang Sprint 10.2.9
-
Story Points:3
When navigating to a document which has a nuxeo-document-preview.html we can notice that the _updateBlob method is called up to 5 times.
In case of a pdf document, this involves that the pdf viewer will be loaded 5 times uselessly issuing 5 times a request to fetch the pdf blob attached to the document (which will be mitigated by NXP-25385 anyway).
This may be one of the cause of slowness observed on cheap machines when navigating from a document to another one (when it has a main blob attached).
Note the cause is the pattern of the element: the declaration of all the observers (_computeImageSource, _computeVideoSources, _computeStoryboard, _computeAudioSource, _computeIFrameSource) Each of them ends up calling _updateBlob.
static get properties() { return { /** * Document */ document: Object, /** * By default it will display a preview of the main file. * For example using `xpath="files:files/0/file"` will display the preview of the document's first attachment. */ xpath: { type: String, value: 'file:content', }, _blob: Object, _imageSource: { type: String, computed: '_computeImageSource(document)', }, _videoSources: { type: Array, computed: '_computeVideoSources(document)', }, _storyboard: { type: Array, computed: '_computeStoryboard(document)', }, _audioSource: { type: String, computed: '_computeAudioSource(document)', }, _iFrameSource: { type: String, computed: '_computeIFrameSource(document)', }, }; } static get observers() { return [ '_updateBlob(document, xpath)', ]; }
- is related to
-
NXP-25385 Review all Web UI dynamic and static resources http caching strategy
- Resolved
-
ELEMENTS-737 Fix nuxeo-layout importing twice document layouts when navigating from a Folderish to a non-Folderish doc
- Resolved
-
NXP-25329 Fix random failures on preview Web UI ftests
- Resolved