Large Sample Library Performance
My Rando sample database is currently more than 1.6 million one-shots and loops. I assume majority of people won’t have collections that large, but some of us drawn to software like rando will. It’s actually tools like this that made me start collecting a lot more samples because it unlocks the ability to easily discover and utilize sounds from a large local library.
Anyway, rando performs as well or better than other sample library tools, but wanted to share a few observations that might be useful for optimizing rando for large sample collections.
#1 - It appears one of the first things rando does when it is opened is to check if there are any new samples found in the set sample locations, before the GUI even appears.
I timed it with a stopwatch. If there are no new files found that rando doesn’t know about already, it currently takes about 10 seconds on my machine before the GUI appears and if there are a bunch of new samples in folders, it takes even longer. Last timed 50 seconds before the rando GUI is finally displayed on the screen when I had added a bunch of samples to my folders. No loading indicator, just nothing happens on screen for that long.
People with fewer files and folders probably won’t have that extreme of a delay, but my suggestion is perhaps that new file check that occurs can be set to not take place on opening the plugin and instead be initiated manually when going to the sample locations settings area.
#2 - The search settings area will total up the number of results from whatever filters are set. But even if no search filters are set, it will still query the total of all samples present in the whole database every time. That total is fixed and doesn’t change until new samples are added or removed, so it could be optimized to just store that big total of all samples somewhere instead of querying that number every time.
For 1,651,890 results, it takes about 15-20 seconds for the search page to return that number back from the database.
Log in to comment and vote
Comments32
Dennis De Laat
May 14
I have given this some thought and we should be able to make some tweaks to improve your performance!
1.6 million wow!!
dré
May 23
I have a similar number, 1.3m on my M4 Pro (2.09) took a fraction of the time I am seeing on Beta 17. So much so, it’s unusable in it’s current form. Why has it slowed down so much?
Dennis De Laat
May 24
Hi,
That is very strange, as we tested with 3 million samples.
Reason is that we now show a list on the right in search settings, but we have limited the rows to 20.000 so that should have taken care of things.
I will do a test today on Mac to see if I can reproduce as I think the programmer is on Windows, but that should not matter so much.
But to be clear: are we talking about #1 or #2?
dré
May 24
Sorry. The last build you sent me some months ago, 2.09. I had very few issues on that build (MacMini M4 Pro). I had to turn the Studio (M2 Ultra) machine off, and it had not finished. That was after about 5 hours. The bar was moving. At 5 hours, it was at about 75%. I’d remove the time left bar too. I don’t think it ever showed more than 9 minutes remaining throughout the entire 5 hours. That was my 1st folder (343K), I never started the main folder with 1.3m samples.
Dennis De Laat
May 19
Hi all,
We are baking a new special update to address this, and it should be ready in 1-2 hours. I hope some of you have time to check it out. We made some great optimizations! That way, if you have time to test later, then we can take this feedback with us tomorrow!
Den Unison
May 20
Hi,
I just tested the Beta 16 release with a library of 7,095 samples.
There is definitely an improvement in scanning speed compared to the previous beta releases, but it still takes significantly longer than the current stable release.
Scanning times:
The new Beta: 3m 29s
Current stable release: 16s
I understand that the beta is running a complex analysis for sample classification, but it might be worth considering making this process optional.
There may be users like myself who don’t use this feature very often and would prefer faster scanning performance over sample classification.
Something like a quick scan mode or a simple toggle to enable or disable the classification step would be a great solution, allowing us to choose between scanning performance and sound categorization depending on our needs.
Dennis De Laat
May 20
Hi Den,
thanks for this!
What is your current stable release? 2.0.6 or 2.0.12
What are your computer specs?
Win/Mac
Which model
Which processor
I will test this myself with 10,000 loops.
Thing is that AI scanning only happens on folders below 1,000 items on a very fast computer otherwise we do this in the backend while you are working on 1 thread.
Den Unison
May 20
Rando stable version is 2.0.6
OS: Windows 11
CPU: AMD Ryzen 9 5950X
RAM: 64GB
Dennis De Laat
May 20
What I see now is that every file gets an extra audio analysis pass which gives us information about uniqueness, and many other things, will see today if we can move that to a post scan process.
Dennis De Laat
May 20
@Den Unison we just talked here and there is one thing we need to make much more clear to people is that you do not have to wait for scanning to be done. We are just enriching our samples after the first quick pass.
Den Unison
May 20
Yeah, that definitely should be stated somewhere on the welcome screen during the scanning stage, similar to how it’s shown on the sample locations settings page. I mean this text: “Rando is scanning, you can safely close the settings window“. That part really isn't clear enough and made me wait for the entire process to finish before clicking “Done” button 😅
dré
May 23
I have a similar number, I have just moved to a new music machine (M2 Ultra Mac Studio). The 1st folder 344k 50% done after 3 hours. While I understand it’ll work in the background. I’’m not leaving this machine on 24/7. 2.09 on a M4 Pro was MUCH faster.
The loss of settings and/or inability to reliably back settings up is frustrating.
Maybe, if there was a way to reliably (and simply) move settings/folders/scan results between machines I could do the scan on my M4 that I leave on 24/7 but I am not leaving this new mac Studio on 24/7 just so I can complete the scans. The bulk of which, had already been done on 2.09 on the M4 Pro anyway.
Dennis De Laat
May 25
Hi all,
is there any way one of you can upload their db file? It will not contain samples, but you do need a big file transfer utility like dropbox or something). That way I can test of that as on my computer stuff is instant (and i can seewhat could be going on).
I tested with 2 million and almost instant!
Dennis De Laat
May 26
Hi all,
can you retry adding your big locations and make sure that AI scanning is turned off?
Den Unison
May 27
Hi,
Just tested it on a library of 7,095 samples.
Turning AI scanning off makes the scan nearly instant!
Scanning times:
AI Scanning OFF: 4s
AI Scanning ON: 3m 29s
Thanks for adding this option. It really helps to get control over the scanning performance and sample classification.
Dennis De Laat
May 27
It was sitting there all this time! lol ;)
Den Unison
May 27
Lol, somehow I completely missed it 😅
Do you think it would be difficult to make this option available per sample location instead of globally? That would give us even more control over the scanning performance.
Dennis De Laat
May 27
was thinking about it, but Rando also needs to be easy to understand for people as well. So what i want to do is move the 2nd part of the scanning out of sight completely, and move it completely next to this toggle, where it can (much slower than now) slowly work on analysing samples in the backend.
That way everybody wins.
Den Unison
May 27
Agreed, sounds great. I’d also keep the current toggle as a hard off switch for AI scanning, so there’s always an option to quickly add a large library and immediately start working with it without any background analysis affecting performance.
But I assume that’s already part of what you’re describing. Just making the second-stage processing optional and decoupled from the initial quick scan.
Dennis De Laat
May 29
Hi guys, everything should be much better now!
Den Unison
May 29
Hi,
Thanks for the update! The new workflow feels great to me. I'm really liking the minimal and elegant approach of moving the AI scanning progress out of sight and into the Settings tab.
I did notice that the AI scanning stage still feels fairly CPU-intensive, which makes it a bit more demanding than what I'd typically consider background processing.
That said, I'm personally totally fine with it since I don't use AI analysis very often and prefer to keep it disabled most of the time.
Just thinking about different user workflows, it might be worth considering some kind of "Turbo Mode" button next to the Advanced Sample Analysis option. That way, users could choose whether they want the analysis to utilize more CPU resources and complete as quickly as possible while they're away from their machine, or keep it in a low-priority mode that runs seamlessly in the background while they're actively using the app.
Just a thought, though. I'm personally very happy with the current implementation 🙂
dré
May 29
I am not seeing an improvement.
The scan took about 30s to start (from refresh all being clicked), searching 2 folders.
It then took another 11.30 mins “waiting for scan to start” folder 1, (which it’d already scanned before)
Why is the start time so long?
The timing (estimate) is WAY off. It was showing at 16+ mins to finish folder 1 but actually took about 3 mins after starting on 1 folder. It’s clear the speed increases you see only relate to folders that may have been scanned before.
Folder 1 shows 1,13m files but scanned (according to the files remaining) over 2m files.
Folder 2 then took to 28 mins to start. showing (0 samples to start and over 500k files to scan).
Timing, was showing as being another 38mins, then going well over 90+mins (after 28 had already elapsed at the beginning).
I had to stop after an hour, when only 37% had completed and it was showing another 38 mins to finish.
1st folder was a rescan, the 2nd folder was new. Not been scanned in the beta before.
I noticed a large set of files in my Library/Application Support folder, some 1.3gb. How do I move these (if required) to an external SSD? Most of this (1.2gb) is the database.db file and 102mb for logs.
Dennis De Laat
Jun 4
can you recheck with v19?
dré
Jun 4
It’s worse, using refresh all, the 1st folder, showing 136k+ files, “waiting for scan to start” failed after 15 mins. 2nd folder showed 1.1m, I gave up after 20mins
Dennis De Laat
Jun 4
can you please send the rando.txt file
Dennis De Laat
Jun 4
also try with the deep analysis setting turned off please ;)
dré
Jun 4
I’ve searched, no such file exists on any of my drives.
Dennis De Laat
Jun 4
Click Tech Support in the help section, it will export the file to your desktop. please email it to hello@monkeyc.audio. We will get this sorted before release, that is why I am happy you are here in the beta. We have squashed a lot of db bugs already, but no clue why this keeps happening to you. Please do this after you started scanning, you are allowed to go to other screens in Rando.
dré
Jun 4
I have sent the file. I zipped it to save space.
I don’t use the built-in email program (or any other “app”). I use a web portal for all my emails, so this function does not work. You need to give the option to choose your method or allow me to choose to “view the file” in File Explorer/Finder so that I can upload it. I would have thought the majority of customers use a web portal to send/receive emails so would be frustrated to have the OS mail app open.
Dennis De Laat
Jun 4
can you also try scanning them one by one, and not with refresh all?
dré
Jun 4
no, it’s stuck retrying the 1st folder, I see no option to stop the 1st folder just rename, refresh and delete file location. This is the same whenever I restart I’ve had the beachball of death a couple of times so I have had to force/quit.
Turning advanced sample analysis off doesn’t seem to speed anything up and I really don’t have time to sit and watch it with a timer for longer than I have already, sorry. It’s been almost 1 hour and nothing has gone passed “waiting for scan to start”
Milkman
Jun 12
This is working GREAT now!! Not only does scanning + advanced analysis complete, even on my large, slow 16TB HDD, but I decided to buy a new 2TB NVME to speed things up and it REALLY sped things up! Now my 1.1 million sample library can complete a full scan and analysis in 10 minutes!! It doesnt even take 1 hour anymore. Well done! Thank you!