mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
[Files Refactor] Performance tuning (#2813)
* Do database txn in same thread. Retry on locked db * Remove captions from slimscenedata * Fix tracing * Use where in instead of individual selects * Remove scenes_query view * Remove image query view * Remove gallery query view * Use where in for FindMany * Don't interrupt scanning zip files * Fix image filesize sort
This commit is contained in:
@@ -250,12 +250,6 @@ func (r *fileQueryRow) appendRelationships(i *file.BaseFile) {
|
||||
}
|
||||
}
|
||||
|
||||
func mergeFiles(dest file.File, src file.File) {
|
||||
if src.Base().Fingerprints != nil {
|
||||
dest.Base().Fingerprints = appendFingerprintsUnique(dest.Base().Fingerprints, src.Base().Fingerprints...)
|
||||
}
|
||||
}
|
||||
|
||||
type fileQueryRows []fileQueryRow
|
||||
|
||||
func (r fileQueryRows) resolve() []file.File {
|
||||
@@ -279,11 +273,6 @@ func (r fileQueryRows) resolve() []file.File {
|
||||
return ret
|
||||
}
|
||||
|
||||
type relatedFileQueryRow struct {
|
||||
fileQueryRow
|
||||
Primary null.Bool `db:"primary"`
|
||||
}
|
||||
|
||||
type FileStore struct {
|
||||
repository
|
||||
|
||||
|
||||
Reference in New Issue
Block a user