Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-15890

Drive: optimize FileSystemItem path computation to minimize document adaptation

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0
    • Fix Version/s: Postponed
    • Component/s: Nuxeo Drive

      Description

      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?
      • ...

        Attachments

          Activity

            People

            • Assignee:
              ataillefer Antoine Taillefer
              Reporter:
              ataillefer Antoine Taillefer
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.