nextcloud / nextcloud/previewgenerator
Manually scanning app data
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 520
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
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) 🎉 😄
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sequence using the occ preview:pre-generate and occ file:scan-app-data entry points with a large photo collection. Compare preview loading and server CPU usage before and after scanning, then determine whether the scan is expected, required, or has documented downsides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, php
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100