AnsweredAssumed Answered

Alfresco is very slow objectList.hasNext() CMIS

Question asked by elcamino on Nov 3, 2018
Latest reply on Nov 12, 2018 by afaust

Hello

 

Im working on a simple file explorer. User simply clicks on a folder & a folder list is displayed. There are over 200 sub folders inside a my test folder. But it is taking forever.

 

I measured the performance of the code & found out that that there are 2 major time delays, 5 seconds & 8 seconds. As result fetching 200 filenames takes 13 seconds. You can not really expect the user to wait 13 seconds each time he tried to navigate to a new folder.

Is there a solution to this problem?

Log file & the code are attached below.

 

First time delay happens at objectList.hasNext() line

2018-11-03  14:35:31.341    9608    --- :   4852.2536ms objectList.hasNext()

 

Second delay happens after first 100 files are fetched

note that I set operationalcontext.setMaxItemsPerPage(100000);

2018-11-03  14:35:26.462    9608    --- :   0.0937ms    getCmisSession()    
2018-11-03  14:35:26.462    9608    --- :   0.0392ms    createOperationContext()    
2018-11-03  14:35:26.487    9608    --- :   24.6645ms   getObjectByPath()    
2018-11-03  14:35:26.488    9608    --- :   0.0534ms    folder.getChildren().iterator()
...
2018-11-03  14:35:31.347    9608    --- :   0.0025ms    NodeNr.99   CMIS_FOLDER
2018-11-03  14:35:31.348    9608    --- :   0.0024ms    NodeNr.100  CMIS_FOLDER
2018-11-03  14:35:39.051    9608    --- :   0.0065ms    NodeNr.101  CMIS_FOLDER
2018-11-03  14:35:39.051    9608    --- :   0.0029ms    NodeNr.102  CMIS_FOLDER
...
2018-11-03  14:35:39.237    9608    --- :   12774.8885ms    Total method execution Time!

Outcomes