0
Planned

Improve file loading speed

feng 8 months ago in Feature requests updated by Vlad R 4 months ago 13

I'm a photographer  and I have large amount of photos to store, however once a folder contains thousands of files, it can be slow to load the folder on the web.

I know this may be because my server performance is not enough or PHP execution efficiency is too low.

But I found that other cloud disk programs use a "lazy load" method to speed up file loading:  when I open a folder with a lot of files, it will quickly load a portion of the files, and then gradually load the rest as I scroll down

Under review

Please be a bit more specific with "slow to load the folder on the web.". Load just the list? Load all the images? Where on the web? Is it the FileRun authenticated user interface or somewhere else?

Yes,just loading files list is slow.  both on web page  and  webdav  client.

When I click on a folder on a web page, the screen goes blank, and it takes five or six seconds for the file to load.

I'm sure it's not because of the network, because it's over a gigabit LAN, and there's no problem with opening folders with fewer files

Planned

The time it takes to display 1000 items in the same folder, in a browser, is about 3-4 seconds. And that is in ideal conditions. You either have to accept that, or organize your files better and not have thousands of files in the same folder. If you can't do that, perhaps FileRun is not the best solution for you at this moment.

We have plans of paginating very large lists of files, but that will happen in the future.

Would be appreciable the speed increase in this cases changing to an SSD?

The files themselves don't need to be on an SSD, thought that will considerably speed things up, but if you have the MySQL server local and on SSD, it will make a big difference.

If you have a long wait for the thumbnails to load, then there are other things one can do to optimize that.

I have FileRun on docker. System, db, and HTML in SSD, and files in HDD.

And I browse folders with hundreds of images very fast.

+1

I have the same storage strategy as you. SSD stores html, config, db.. and HDD stores userfiles. However, you can try comparing it to SFTP.

On my server, SFTP loads faster with almost no latency, while filerun via webdav loads a large number of files will be frozen for  a few seconds

that's just a low-effort response, to be honest. It is slow because the thumbnails are generated on the fly, as you scroll through a list.. they're not stored anywhere.. and I didn't specifically check, but probably the cache headers aren't set properly on the request either, otherwise the browser would be able to load the images from its own cache (which wouldn't even require FileRun to store its own thumbnails)..

I hit this problem myself, my intention is to try to put an nginx in front of filerun to take care of caching requests, not sure how well that will work but I'll give it a try _at some point_ :) 

Entitled, half-learned and plain wrong. Just useless noise.

that was just my experience, no need for ad-hominem attacks ;)


scrolling through a folder with 1-2k photos would constantly stop the scrolling to generate the thumbnails that would come into view. 

which part of my comment is wrong, please? I am genuinely curious what's the actual issue here, because scrolling through a webpage with 1-2k images shouldn't ever be a problem on any modern hardware, if the images are pre-generated/loaded from browser cache.

the thumbnails was stored at .filerun.thumbnails which was a hidden folder 

he's right, not only that, but now HTML5 supports the loading="lazy" natively, there's no reason to load all the images at once even if not on viewport

FileRun lazy loads thumbnails by default.