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
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.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()