-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 8.3-SNAPSHOT
-
Component/s: Nuxeo Drive
-
Sprint:nxfit 8.3.1
Release Notes
Adaptation of a document as a FileSystemItem for the Nuxeo Drive synchronization has been optimized by not fecthing the lock information when unnecessary, typically in the case of a call to the NuxeoDrive.GetChildren or NuxeoDrive.ScrollDescendants operation.
Technical Details
JVM sampling during a call to GetChildren shows that DefaultFileSystemItemFactory#adaptDocument spends a lot of time in DocumentModelImpl#getLockInfo.
Attached visualvm snapshot shows that on a call with 1.000 children approximatively 1000 ms come from getLockInfo.
Currently there is 1 occurrence of getLockInfo in AbstractDocumentBackedFileSystemItem:
protected AbstractDocumentBackedFileSystemItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint) { ... lockInfo = doc.getLockInfo(); }
In the case of a call to DocumentBackedFolderItem#getChildren or DocumentBackedFolderItem#getDescendants we can probably skip this call.
Indeed, this flag is only used by Drive in Processor._synchronize_locally_modified where the remote info (FileSystemItem) is re-fetched to have a fresh state, so storing it for the initial pair state is not required.
This is the same kind of issue as NXP-19441.