Skip to content

Commit 9fc17af

Browse files
committed
Scanning optimization
Extend scanning logic by filtering databases, so that queries that will certainly be unsuccessful, are skipped. Filtering criteria: - size of scanned file - presence of serial (in case of serials) Two extra queries for min and max are run for each database on the first scan, this causes single-file scans to be somewhat slower, but it pays off with large scans. Archive size is also checked. The built-in shortcut of scanning both the archive (zip file) and the first (possibly only) file inside the archive is retained, it makes logic more complicated, but the speed difference is significant for sets that contain one zipped file per title.
1 parent d43a641 commit 9fc17af

2 files changed

Lines changed: 255 additions & 41 deletions

File tree

database_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ enum database_type
4444
DATABASE_TYPE_ITERATE_ARCHIVE,
4545
DATABASE_TYPE_ITERATE_LUTRO,
4646
DATABASE_TYPE_SERIAL_LOOKUP,
47+
DATABASE_TYPE_SERIAL_LOOKUP_SIZEHINT,
4748
DATABASE_TYPE_CRC_LOOKUP
4849
};
4950

0 commit comments

Comments
 (0)