nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
466 stars 57 forks source link

Manually scanning app data #160

Open pestotoast opened 5 years ago

pestotoast commented 5 years ago

Since this app exists I always had the problem that after running occ preview:pre-generate my photos still seemed to load very slowly (via the gallery app and the Android app). During this time the CPU load on the server was also quite high, as if the previews were created for the first time.

If i opened the folder in the browser via the files app all previews loaded fast and CPU load was low -> pregenerated previews were used I guess. I always assumed that this behaviour was normal and my server simply didn't have enough resources to show the previews quickly.

However, now I found a workaround:

I run occ file:scan-app-data after occ preview:pre-generate everything is fast and CPU load stays relatively low. My Nextcloud and the Android app are now finally usable to watch large photo collections (>200GB) :tada: :smile:

Therefore I have updated my cron job to:

0    6    *    *   * php -f /var/www/html/occ preview:pre-generate
0    7    *    *   * php -f /var/www/html/occ file:scan-app-data

Is this behaviour excpected? Maybe someone can reproduce this too? Is it a good idead to run occ file:scan-app-data regularly or are the any downsides?

eibex commented 4 years ago

Is there any update on this? I tried to run occ file:scan-app-data and my database size increased by 20%. Even after running occ file:cleanup it returned that there are no orphaned files.

I never added anything manually to my Nextcloud so surely all those new entries must come from this app.