-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan optimizations #419
Scan optimizations #419
Conversation
All commits:
Sans last:
659.49 vs 659.28 CPU time in total. Damn. That's one useless commit. I won't scan without the patches, it would takes ages. |
273 tracks, 36 albums, 20+ artists. Used NC encryption module. w/ 2 commits: w/ 3 commits: |
Hey, i checked the NC server repo and found some things. b.) do we need to take care of roll backs? |
a) Even after searching I have no idea what that is or why would I want that. It's not well documented and not really part of public API. If no bugs appear, I won't mess with that. |
yes. the change towards the status in the DB was necessary as session/cache values could not be stored. this was done on advice by the NC backend team. The scanForAudios is a bit complex - yes. but it is working. I want to do a test also of your current implementation. but @r4sas test looked also interesting already |
This reverts commit cb15546. It did not provide any measurable performance benefits.
I reverted the commit (thanks @r4sas), rebased on current master and split the scan into smaller methods without really touching the insides. Moving ~200 LoC into try-catch with yet another level of indendation would make it unreadable. |
thank you. I am thinking about the commit. from the history there are regular tickets for users with either wrong php config in terms of tmp, runtime or external storage settings. what do you think? |
nice. but: I am getting Error 405 when scanning from the Webfrontend. is it working for you? |
All OK for me. Are you sure correct routes.php and settings.js are being used? Could you post the saved request & response from devtools (save all as HAR, maybe censor access tokens there first)? I tested with FF and Brave with nginx 1.17.
I thought about that but when I saw a transaction limit somewhere (maybe the files app, I'm not sure, I went through a lot of code) it was 100k or maybe even 1M, so I opted against it. |
I tested with current trunk, havent that problem. But at end of scanning and closing notification window right side of page not changes from "Add new tracks to library" page. |
One note for the mime types: the search goes for the filecach (table) and not for the files itself as far as i know. |
ok. seems to be a cache issue. working now... |
I know it does not, but what is the appropriate screen here? If the library gets reset, last session values get deleted. I think AP previously defaulted to the graphical albums view but this is the new default since the latest graphical view commits. What should be displayed after scan?
OK. One DB read + filter would probably still beat 5 separate DB reads, but not by a large amount. If measurable. |
I think we must switch page to clean track list (where just table without tracks). Or better to |
Hi, I did some optimizations for library scanning/reset, it should be way faster. My ancient potato with non-hw-accelerated luks-aes-encrypted 2TB hdd went from ~30min to ~30sec while scanning 98 song sample w/ 20 albums & 16 artists and reset from ~30sec to <10sec.
Most of the magic is in the first 2 commits. The last one should help in theory, but my benchmarks varied so much I can't really tell. I will run it again later on real data with way more files.
Could you run the scan prepended with
time
command for the whole thing and then again without the last commit, so we get more results?I'll revert it if we don't get anything conclusive.