Contacts are loaded extremly slow

When opening the contacts app, the contacts (approx. 20) get loaded extremely slow >10 min. Once loaded everything works as expected. I could not find any issue in the installation.

Steps to reproduce

  1. Open contacts app

Expected behaviour

Contacts should load in reasonable time

Actual behaviour

Contacts need 10+ minutes to load

Server configuration

Operating system:
3.4.111-bananian GNU/Linux
Web server:
Apache/2.4.10 (Debian)
Ver 15.1 Distrib 10.0.26-MariaDB
PHP version:
PHP 7.0.10-1
Nextcloud version: (see Nextcloud admin page)
Updated from an older Nextcloud/ownCloud or fresh install:
fresh install
Where did you install Nextcloud from:
Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ```


  • activity: 2.3.2
  • calendar: 1.3.3
  • comments: 1.0.0
  • contacts:
  • dav: 1.0.0
  • federatedfilesharing: 1.0.1
  • federation: 1.0.1
  • files: 1.5.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 1.0.0
  • files_texteditor: 2.1
  • files_trashbin: 1.0.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.0
  • notifications: 0.3.0
  • password_policy: 1.0.0
  • provisioning_api: 1.0.0
  • serverinfo: 1.1.1
  • survey_client: 0.1.5
  • systemtags: 1.0.2
  • tasks: 0.9.3
  • theming: 1.0.1
  • updatenotification: 1.0.1
  • workflowengine: 1.0.1
  • admin_audit
  • encryption
  • external
  • files_accesscontrol
  • files_automatedtagging
  • files_external
  • files_retention
  • templateeditor
  • user_external
  • user_ldap
  • user_saml

**The content of config/config.php:**
<summary>Config report</summary>

“system”: {
“instanceid”: “ocsgn2smnlw4”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“datadirectory”: “/media/usb-hdd/nextcloud/data”,
“overwrite.cli.url”: "https://
“dbtype”: “mysql”,
“version”: “”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“logtimezone”: “Europe/Berlin”,
“log_type”: “owncloud”,
“logfile”: “/var/log/owncloud.log”,
“installed”: true,
“memcache.local”: “\OC\Memcache\APCu”,
“default_language”: “de”,
“updatechecker”: true,
“mail_from_address”: “**********”,
“mail_smtpmode”: “smtp”,
“mail_domain”: “”,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtpauth”: 1,
“mail_smtphost”: “”,
“mail_smtpport”: “587”,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“mail_smtpsecure”: “tls”


**Are you using external storage, if yes which one:** no

**Are you using encryption:** no

**Are you using an external user-backend, if yes which one:** no

### Client configuration
Firefox 48
Google Chrome 52.0.2743.116
**Operating system:**
4.4.0-34-generic GNU/Linux
### Logs
#### Web server error log
<summary>Web server error log</summary>

PHP Warning: Module ‘PDO’ already loaded in Unknown on line 0
[Tue Aug 30 13:03:00.581756 2016] [mpm_prefork:notice] [pid 12196] AH00163: Apa$
[Tue Aug 30 13:03:00.582227 2016] [core:notice] [pid 12196] AH00094: Command li$


#### Nextcloud log (data/nextcloud.log)
<summary>Nextcloud log</summary>

{“reqId”:“GK7R74qORTzbIFOwFOJZ”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:19+02:00”,“method”:“PROPFIND”,"$
{“reqId”:“0R/Edc7yVr8JDvQkDrhD”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:26+02:00”,“method”:“POST”,“url$
{“reqId”:“w/Y2TnF9U/oTHrDrkaDx”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:27+02:00”,“method”:“GET”,“url$
{“reqId”:“c1Crr9zpMvpNaInrmtlg”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:28+02:00”,“method”:“GET”,“url”:blush:
{“reqId”:“ARIRpf5c4z85EkIPGPwx”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:30+02:00”,“method”:“GET”,“url”:blush:
{“reqId”:“ZAPtyZvOngO2uo8CL83X”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:30+02:00”,“method”:“GET”,“url”:blush:
{“reqId”:“8MMUFumD3FXzF4cvsFR4”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:45+02:00”,“method”:“PROPFIND”,”$
{“reqId”:“QSP2+OgcacmkA2FnUXRG”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:47+02:00”,“method”:“POST”,“url”$
{“reqId”:“fniGio4DQAI9PAEMUH3t”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:03:51+02:00”,“method”:“GET”,“url”:blush:
{“reqId”:“xxgp6nvyx+wLDNKVCTYr”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:04:16+02:00”,“method”:“PROPFIND”,”$
{“reqId”:“wSLFfjroJZ+AR2yzEWXq”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:04:25+02:00”,“method”:“PROPFIND”,"$
{“reqId”:“T9HEZUoAkpsRdPYmvamy”,“remoteAddr”:“”,“app”:“PHP”,“message”:“Module ‘PDO’ already loaded at Unknown#0”,“level”:3,“time”:“2016-08-30T13:04:55+02:00”,“method”:“GET”,“url”:blush:


#### Browser log
<summary>Network log</summary>

addressbooks200xhrdav.js?v=1ca9a51…:3640728 B 2.65 s

addressbooks207xhrdav.js?v=1ca9a51…:36401.4 KB 859 ms

andreas/207xhrdav.js?v=1ca9a51…:36401.4 KB 753 ms

andreas/207xhrdav.js?v=1ca9a51…:36402.1 KB 617 ms

contacts/207xhrdav.js?v=1ca9a51…:364022.3 KB 1.13 s

andreas/207xhrdav.js?v=1ca9a51…:36401.3 KB 765 ms

theming?v=2200script(index):108922 B 3.06 s

cron.php200xhrjquery.js:8630750 B 1.68 s

notifications?format=json200xhrjquery.js:8630844 B 2.42 s

contacts/207xhrdav.js?v=1ca9a51…:36409.0 MB 7.9 min

notifications?format=json200xhrjquery.js:8630844 B 843 ms

notifications?format=json200xhrjquery.js:8630845 B 2.82 s

notifications?format=json200xhrjquery.js:8630845 B 2.73 s

notifications?format=json200xhrjquery.js:8630845 B 2.66 s

notifications?format=json200xhrjquery.js:8630845 B 2.20 s

notifications?format=json200xhrjquery.js:8630845 B 2.08 s

notifications?format=json200xhrjquery.js:8630845 B 2.02 s

notifications?format=json200xhrjquery.js:8630845 B 2.08 s

notifications?format=json200xhrjquery.js:8630845 B 2.18 s

notifications?format=json200xhrjquery.js:8630845 B 2.21 s

notifications?format=json200xhrjquery.js:8630845 B 2.50 s

notifications?format=json200xhrjquery.js:8630845 B 2.85 s

notifications?format=json200xhrjquery.js:8630845 B 2.10 s

notifications?format=json200xhrjquery.js:8630845 B 1.30 s

notifications?format=json200xhrjquery.js:8630845 B 1.15 s

notifications?format=json200xhrjquery.js:8630845 B 2.00 s

addressBook.html200xhrangular.js?v=1ca9a51…:114421.4 KB 74 ms

contact.html200xhrangular.js?v=1ca9a51…:11442836 B 57 ms


I have meanwhile updated tp PHP 7.0.10-1, as it was recommended to speed up servers on small systems, but it did not help. But as it solved some of the error messages I have updated the initial post with new logs.

In the current state of the app, all contacts get loaded on startup of the app. Currently also no caching is implemented, therefore with every invocation of the app, all contacts get loaded every time. Having contacts with big pictures increases the loading time dramatically and therefore even only having about 20 contacts can lead to a significant loading time.

Do you contacts contain big pictures?

Generally: Pull requests are very welcomed for the contacts app, as no core developer is currently working on it full-time and the rest of the commits are done in the developers’ spare time. :slight_smile:

Thanks a lot for this hint. I had some pictures added to the contacts. After reducing the size, the load time decreased significantly. By the way: Is there any way to delete pictures over the GUI?

Regarding the pull requests: I fear my programming skills are not sufficient for a useful contribution, but I will have a look. :slight_smile:

1 Like

I’m happy to hear that! :blush: Unfortunately, currently there is no way to delete contact pictures via the contacts app.
Edit: Even “just” reviewing currently open pull requests and writing issues is a great help in pushing the contacts app forwards!

I installed OC then NC for a client. The first thing he did was upload 18 THOUSAND contacts, You can imagine what happens in the browser…

Thomas Müller once told me, before the contact app rewrite happened, that a version with infinite scrolling would be considered. Sad that it did’nt happen yet. I understand that people want a fast response in the GUI when selecting groups of contacts and such, and therefore the current paradigm that all contacts are loaded in one go.

But let’s face it: With a larger number of contacts that strategy is just not real-world - especially not with all those tons of angular-JS running for each single contact, before the page is ever displayed.

I see that Hendrik and Co. have written a theoretically beautiful software - looks like it could easily do for a Diplomarbeit. But when real-world usability gets sacrificed to the God of software design principles then I reckon we have a problem. If not, what should I tell my client?

How about someone writing an alternative “Big Contacts” with selection filters BEFORE anything is displayed, and infinite scrolling on the result set? And just being an alternative view on the DB tables already there. Now THAT would be fantastic (and sorry, no, I really don’t have the skills or capacity, otherwise I gladly would).