notes icon indicating copy to clipboard operation
notes copied to clipboard

Very slow to load the notes list

Open xdmx opened this issue 9 years ago • 1 comments

Steps to reproduce

  1. create many notes (I have 60)
  2. load the notes

Expected behaviour

It quickly loads the list of notes in the left menu

Actual behaviour

It takes about 18 seconds to load the list, a single note opens in 800 ms

Server configuration

Operating system: Ubuntu 14.04

Web server: Scaleway instance with nginx

Database: mysql 5.5.47

PHP version: 5.6.17

ownCloud version: (see ownCloud admin page) 8.2.2

xdmx avatar Jan 27 '16 16:01 xdmx

Now I have many more notes and it's taking 30 seconds to load the notest list.

Checking the response of the notes call I see that it returns the content of all notes. I think that the problem is exactly this, scaleway has a quite slow hard drive (connected to the network, not directly to the server) which takes a little bit to load each file and it also has to decrypt each note at every request.

Checking the code it seems that the index loads each file and thus it takes a lot of time increasing exponentially (https://github.com/owncloud/notes/blob/master/service/notesservice.php#L49) and then the get response loads that file again.

Since the name of the file is the title of the note, why does it load the content of all notes as well? Shouldn't it load only the list of files instead?

xdmx avatar Mar 09 '16 07:03 xdmx