Nextcloud extremely slow in folder with 12000 small photos

I have an instance of Nextcloud 28.0.3 running on docker, with mariaDB, redis and imaginary.

I am the only user, and only access the file storage from within my LAN. So, no proxy or anything needed. I access it directly via http://ip:port

I have a few folders with a few pictures, and overall nextcloud works well. Except for one folder, which has about 12000 pictures. I have pre-generated preview (thumbnails) for all of them, but still, whenever i try to open that folder, on the web or android app, it takes forever.

Usually around 10-15 seconds to load the page. The android app also freezes for about 10 seconds before it starts to show the images. If i open one picture and press the back button, it seems like it loads it all over again - which takes another 10-15 seconds.

It is clearly struggling and not well optimized. Seems like nextcloud loads every asset every time.

I have done a few things to try to improve, which have had little impact…

I have set the PHP Memory limit to -1 (the machine has a total of 8GB of RAM, and ONLY runs nextcloud.

Redis is implemented and running.

I checked the logs for when i try to open this folder, and no errors seem to be happening. its simply that nextcloud loads all the assets every time.

Is this normal? Is nextcloud just bad and handling folders with too many images? (most of these images are small, about 140kb each…)

EDIT: I have installed the nextcloud memories app on top of my nextcloud instance. Memories is able to breeze through that folder. All the images show up in less than 2 seconds. This proved that there is indeed a problem with the folder view implementation in nextcloud files.

I would say this is a normal Issue. With such small instance you will not get it faster. Docker is only a container. Best practice is make more folders with less pictures. The Server must load everytime tons of informations and send it to the client or build the webpage what shows you the pictures. Or you buy a fast bolide Server.

Then how does memories manage to do it, on the same hardware, with same files, running ON TOP of nextcloud?!
To me, this is a clear case of poor implementation…

1 Like