just a thought
i know that with some apps and devices, you can exclude folders by placing a file called .nomedia therein
[
https://fileinfo.com/extension/nomedia
What is a NOMEDIA file?
A NOMEDIA file is a file stored on an Android mobile device, or on an external storage card connected to an Android device. It marks its enclosing folder as having no multimedia data so that the folder will not be scanned and indexed by multimedia players. NOMEDIA files have no filename prefix and are simply named .nomedia.
More Information
The use of NOMEDIA files helps boost performance by excluding folders that do not need to be scanned. For example, a folder that has thousands of songs or images can be excluded. NOMEDIA files can also be used to hide ads featured in free apps when placed in the same directory of the ad. Many Android audio and video players as well as image browsers (Gallery, MP3 Player, Video Player, etc.) recognize NOMEDIA files.]
I wonder if there is any mileage in requesting a calibre enhancement to have it ignore all folders that contain some such trigger file name- and thus greatly speed up initial device scans ?
unfortunately - one useful place to put a .nomedia file is in a calibre library to stop book covers from cluttering photo galleries !
so maybe calibre would need its own trigger - e.g. a .nocalibre file ?