mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
The scanning process could try to fetch thousands of roms from the database, one by one, which is very inefficient, especially when only a few new roms are added to the library, as the overhead of database calls is very high compared to metadata API calls. This change introduces a new method in the roms handler to retrieve roms by their file names in bulk, which is used during the scan process to fetch a batch of roms at once, instead of one by one. It also avoids the `@with_details` decorator when fetching roms during the scanning process, as those details are not needed, and they were adding unnecessary joins and data decoding.