Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow app start / the complete address book is being transferred #176

Open
nicokaiser opened this issue Mar 8, 2016 · 12 comments
Open

Slow app start / the complete address book is being transferred #176

nicokaiser opened this issue Mar 8, 2016 · 12 comments
Milestone

Comments

@nicokaiser
Copy link

Steps to reproduce

  1. Open Contacts app

Expected behaviour

The Contacts app should open fast

Actual behaviour

The Contacts all takes a lot of time to load and transfers lots of data.

Upon startup, the whole addressbook is being transferred, which, for medium-sized addressbooks (like ~200 contacts, some of them with photos) can be quite large. In this case ~10 MB of data is being transferred every single time I open the Contacts app.

I'm not sure if this is by concept (as the Contacts app claims to be only a CardDAV client), but I consider this to be quite inefficient and slow for anything larger than trivial addressbooks with photos (think of web clients in mobile networks with restricted data volume and speed).

Server configuration

Operating system: Debian 8

Web server: nginx

Database: MySQL 5.5

PHP version: PHP 5.6

ownCloud version: 9.0.0

Contacts version: 1.0.0.0

Updated from an older ownCloud or fresh install: Updated from 8.x

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - calendar: true
  - comments: 0.2
  - contacts: true
  - dav: 0.1.5
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - news: true
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - files_external
  - files_pdfviewer
  - tasks
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "512fdebce061d",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/var\/www\/cloud....\/data",
        "dbtype": "mysql",
        "version": "9.0.0.19",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "de",
        "defaultapp": "files",
        "knowledgebaseenabled": true,
        "enable_avatars": true,
        "allow_user_to_change_display_name": true,
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "session_keepalive": true,
        "mail_domain": "cloud.....",
        "forcessl": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "trusted_domains": [
            "cloud....."
        ],
        "mail_smtpmode": "smtp",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "appcodechecker": false,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "smtp.mandrillapp.com",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "enable_previews": false,
        "trashbin_retention_obligation": "auto"
    }
}

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

Browser: Chrome 48

Operating system: OS X 10.11

CardDAV-clients: iOS 9.2, OS X 10.11

@Henni
Copy link
Contributor

Henni commented Mar 8, 2016

We are aware of this issue. This will be changed in the future by:

  • introducing caching
  • only loading parts of the contacts at once

@Henni Henni added this to the 2.0-next milestone Mar 8, 2016
@joswart
Copy link

joswart commented Mar 9, 2016

I am not sure if I am seeing exactly the same issue here, but it looks like it.

My address book is slightly bigger (over 500 contacts). When I open the contacts app it tells me that there are "No contacts in here". Monitoring my server I see two apache processes jump to 100% CPU use. If I give it enough time (like close to an hour), the contact app lists all my contacts.

Pressing F5 sends me into the same loop again.

I notice my IOS devices are no longer syncing, probably due to the same issue? My basic verdict is that carddav is not working at all after the upgrade.

@nicokaiser
Copy link
Author

@joswart iOS / CardDAV syncing seems to work for me, I thought only the frontend is broken (as it tries to be a CardDAV client since ownCloud 9)

@Henni
Copy link
Contributor

Henni commented Mar 9, 2016

@joswart iOS syncing isn't influenced by this app. Please report this in core. (Are you sure you are using the right url? see documentation)

@DeepDiver1975
Copy link
Member

We need to introduce some lazy loading techniques - we will come up with a solution in the next major dev cycle.

@joswart ios might stop syncing because of all server resources are consumed by the contacts web app.

@joswart
Copy link

joswart commented Mar 9, 2016

@Henni: I believe the URL mentioned in the documentation is actually wrong. It is not the one reported in owncloud 9.

The contacts app says: /owncloud/remote.php/dav/addressbooks/users/[username]/contacts/
The doc says: example.com/remote.php/dav/principals/username

Trying the one from the doc fails on my IOS devices. Shall I file a documentation bug?

@Henni
Copy link
Contributor

Henni commented Mar 9, 2016

@joswart that would be great! @DeepDiver1975 can you verify that this is a bug in the documentation?

@schiessle
Copy link

I see something similar I have around 200 contacts and loading the contacts app takes about 13 seconds. In this 13 seconds I see nothing, just a empty address book. If I look at the network console of my browser I see a huge number of propfinds.

Good to know that you are aware of it and that you are working on a solution for the next release because beside the performance issue the new contacts app looks and works really nice 😄

@bunix42
Copy link

bunix42 commented Mar 23, 2016

We also noticed this issue. At least some kind of loading animation should be shown so one knows it is doing something without using firebug or looking on the servers CPU ;)

@Rello
Copy link

Rello commented May 10, 2016

did I understand the thread correctly that the new app is just a carddav-client going via the standard carddav-interface/url?
and the old one was a real app going to the database directly on its own?
What was the reason to do this?

I remember that I could not run owncloud on my previous hoster because the the standard carddav-principles always transfer more or less the whole addressbook every time an leave the work to the client. Due to this, I ran into session-size issues where mobile-syncing did not work - but the webapp did.

@rob9
Copy link

rob9 commented Aug 13, 2016

13 s would be great. I got 80 s per click since forever. Practically every click, and during those 80 s, browser is at 100% cpu. It used to be worse, blocking the server, too. It is very common for first-version vCard apps to put everything in memory and fall apart under that data load. Then they go sqlite or objct cache.

You are using Angular, so I am not sure why caching individual objects would be hard, I hacked some like that in 2 days.

Of course, the OwnCloud contacts app is not useful to me. I use a mix of Android and Evolution meanwhile.

@DeepDiver1975
Copy link
Member

You are using Angular, so I am not sure why caching individual objects would be hard, I hacked some like that in 2 days.

Pull requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants