File listing very slow in folder with larger number of files
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### Steps to reproduce
1. Open the nextcloud app, and then a folder with a large number of files (in my case the folder has 69 subfolders and 704 images)
2. Alternatively, open the web browser on your phone and go to a website where you can upload files, open the Android file picker there, then select Nextcloud in the left-hand side menu of the file picker, and then finally open a folder with a large number of files
### Expected behaviour
- The file listing would load quickly, maybe not as quickly as the web interface, but pretty quickly still
### Actual behaviour
- Both the in-app and file picker listings in such a folder take a very long time (in my case, 31 seconds and 12 seconds respectively)
### Can you reproduce this problem on https://try.nextcloud.com?
I am not able to add the trial account to the Android app because I can't see any way to retrieve the automatically generated password.
### Environment data
Android version: 11
Device model: Nokia 8.1
Stock or customized system: Stock
Nextcloud app version: 3.16.1
Nextcloud server version: 22.1.0
Reverse proxy: Not sure what this means
### Logs
#### Web server error log
```
2021/08/15 02:54:07 [crit] 934#934: *1896 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 64.62.197.182, server: 0.0.0.0:443
2021/08/15 12:43:19 [crit] 934#934: *3612 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 192.241.220.212, server: 0.0.0.0:443
```
#### Nextcloud log (data/nextcloud.log)
```
{
"reqId": "FbyrwUekw96QFYdlCGsB",
"level": 2,
"time": "2021-08-10T17:07:20+00:00",
"remoteAddr": "198.12.158.38",
"user": "--",
"app": "core",
"method": "GET",
"url": "/login",
"message": "Login failed: '8hYTSUFk' (Remote IP: '198.12.158.38')",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0",
"version": "22.1.0.1"
}
{
"reqId": "nGHQM6AJgkIN1fHw3eXZ",
"level": 3,
"time": "2021-08-11T17:46:54+00:00",
"remoteAddr": "",
"user": "--",
"app": "core",
"method": "",
"url": "--",
"message": "More than 1000 expressions in a list are not allowed on Oracle.",
"userAgent": "--",
"version": "22.1.0.1",
"exception": {
"Exception": "Doctrine\\DBAL\\Query\\QueryException",
"Message": "More than 1000 expressions in a list are not allowed on Oracle.",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 593,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 552,
"function": "removeChildren",
"class": "OC\\Files\\Cache\\Cache",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 159,
"function": "remove",
"class": "OC\\Files\\Cache\\Cache",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 329,
"function": "remove",
"class": "OC\\Files\\Cache\\Updater",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1183,
"function": "removeUpdate",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 350,
"function": "basicOperation",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
"line": 446,
"function": "rmdir",
"class": "OC\\Files\\View",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_trashbin/lib/Command/CleanUp.php",
"line": 127,
"function": "delete",
"class": "OC\\Files\\Node\\Folder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_trashbin/lib/Command/CleanUp.php",
"line": 107,
"function": "removeDeletedFiles",
"class": "OCA\\Files_Trashbin\\Command\\CleanUp",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
"line": 255,
"function": "execute",
"class": "OCA\\Files_Trashbin\\Command\\CleanUp",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
"line": 1009,
"function": "run",
"class": "Symfony\\Component\\Console\\Command\\Command",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
"line": 273,
"function": "doRunCommand",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
"line": 149,
"function": "doRun",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Console/Application.php",
"line": 209,
"function": "run",
"class": "Symfony\\Component\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/nextcloud/console.php",
"line": 99,
"function": "run",
"class": "OC\\Console\\Application",
"type": "->"
},
{
"file": "/var/www/nextcloud/occ",
"line": 11,
"args": [
"/var/www/nextcloud/console.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"Line": 268,
"CustomMessage": "More than 1000 expressions in a list are not allowed on Oracle."
}
}
{
"reqId": "OEAt5XLBhiqslivznsVw",
"level": 3,
"time": "2021-08-14T16:45:10+00:00",
"remoteAddr": "192.168.1.1",
"user": "",
"app": "no app in context",
"method": "GET",
"url": "/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=file&search=&perPage=20&lookup=false",
"message": "in_array() expects parameter 2 to be array, null given",
"userAgent": "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"version": "22.1.0.1",
"exception": {
"Exception": "Exception",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 158,
"Previous": {
"Exception": "TypeError",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"line": 101,
"function": "in_array"
},
{
"file": "/var/www/nextcloud/lib/private/Collaboration/Collaborators/Search.php",
"line": 72,
"function": "search",
"class": "OCA\\Circles\\Collaboration\\v2\\CollaboratorSearchPlugin",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php",
"line": 228,
"function": "search",
"class": "OC\\Collaboration\\Collaborators\\Search",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 217,
"function": "search",
"class": "OCA\\Files_Sharing\\Controller\\ShareesAPIController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 126,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"Line": 101
},
"CustomMessage": "--"
}
}
{
"reqId": "csi2fwPT2bCzghqIaGtQ",
"level": 3,
"time": "2021-08-14T16:52:04+00:00",
"remoteAddr": "192.168.1.1",
"user": "",
"app": "no app in context",
"method": "GET",
"url": "/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=file&search=&perPage=20&lookup=false",
"message": "in_array() expects parameter 2 to be array, null given",
"userAgent": "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"version": "22.1.0.1",
"exception": {
"Exception": "Exception",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 158,
"Previous": {
"Exception": "TypeError",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"line": 101,
"function": "in_array"
},
{
"file": "/var/www/nextcloud/lib/private/Collaboration/Collaborators/Search.php",
"line": 72,
"function": "search",
"class": "OCA\\Circles\\Collaboration\\v2\\CollaboratorSearchPlugin",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php",
"line": 228,
"function": "search",
"class": "OC\\Collaboration\\Collaborators\\Search",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 217,
"function": "search",
"class": "OCA\\Files_Sharing\\Controller\\ShareesAPIController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 126,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"Line": 101
},
"CustomMessage": "--"
}
}
{
"reqId": "216bUFSRfhewd3EZI7QL",
"level": 3,
"time": "2021-08-14T16:52:53+00:00",
"remoteAddr": "192.168.1.1",
"user": "",
"app": "no app in context",
"method": "GET",
"url": "/ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=file&search=&perPage=20&lookup=false",
"message": "in_array() expects parameter 2 to be array, null given",
"userAgent": "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"version": "22.1.0.1",
"exception": {
"Exception": "Exception",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 158,
"Previous": {
"Exception": "TypeError",
"Message": "in_array() expects parameter 2 to be array, null given",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"line": 101,
"function": "in_array"
},
{
"file": "/var/www/nextcloud/lib/private/Collaboration/Collaborators/Search.php",
"line": 72,
"function": "search",
"class": "OCA\\Circles\\Collaboration\\v2\\CollaboratorSearchPlugin",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php",
"line": 228,
"function": "search",
"class": "OC\\Collaboration\\Collaborators\\Search",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 217,
"function": "search",
"class": "OCA\\Files_Sharing\\Controller\\ShareesAPIController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 126,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 156,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 301,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/var/www/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/apps/circles/lib/Collaboration/v2/CollaboratorSearchPlugin.php",
"Line": 101
},
"CustomMessage": "--"
}
}
```
**NOTE:** Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate
Contributor guide
Assessment
This issue has not been assessed yet.