-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 6.0
-
Fix Version/s: Postponed
-
Component/s: Nuxeo Drive
-
Epic Link:
-
Tags:
Currently we are recursing up to the synchronization root adapting each ancestor document as a FileSystemItem to compute the item's path sent to the client:
at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:323) at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:153) at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:94) at org.nuxeo.drive.adapter.impl.DocumentBackedFileItem.<init>(DocumentBackedFileItem.java:61) at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:181) at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:244) at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:107) at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:323)
Code involved in AbstractDocumentBackedFileSystemItem:
FileSystemItem parent = getFileSystemItemAdapterService().getFileSystemItem(
parentDoc, true, relaxSyncRootConstraint);
This:
- is not optimized.
- is a problem as seen in NXI-2: currently using document adapters can lock threads.
We should find a better solution:
- avoid computing this path?
- not adapting the documents when doing it?
- using cache?
- be smarter?
- ...