FWIW, I was reading this thread because after migrating from Evernote (yay YARLE), Ive noticed how sluggish Obsidian got with some operations (ie renaming a file, deleting a file, searching)
For reference, according to Vault Statistics, I have 10704 notes, 17557 links, 81460 files, and 70756 attachments. My vault is divided up by years and, currently, goes back to 2011. This is also on my iCloud drive. Ive concluded that their mobile sync is not great.
Prior to Evernote, I was storing a lot of my stuff in email. These go back to 1995 and I still use them for reference. Ive been contemplating pulling them in too but its entirely possible that I could hit 200k files.
If you havnt guessed, Im on the collector end of the spectrum and, prior to Obsidian, all the linkage has always been in my head (and/or via tags after they became a thing). Im workin on that.
So yes, please test and tune for 5M+ files and add some form of caching process to speed up operations. 