From 1f571a903dcf9dee07a1b1c464ff4e472ccc7abe Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sun, 10 Dec 2023 10:44:17 +0100 Subject: Deep thought --- main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 45a5b51..598c5c5 100644 --- a/main.go +++ b/main.go @@ -456,6 +456,8 @@ func (i *importer) Import(path string) error { return err } + // FIXME: This disallows any entries directly in the root. + // TODO: Turn this into an upsert statement. _, err = tx.Exec(`INSERT INTO entry(parent, name, mtime, sha1) VALUES (?, ?, ?, ?)`, dbParent, dbBasename, s.ModTime().Unix(), hexSHA1) if err != nil { @@ -705,6 +707,8 @@ func cmdDhash(args []string) error { defer pb.Stop() // TODO: Also run the hasher in parallel, once it becomes a problem. + // And/or run it in batches, since start-up time of the hasher + // poses considerable overhead with large amounts of images. for _, sha1 := range hexSHA1 { pathThumb := thumbPath(sha1) hash, err := makeDhash(hasher, pathThumb) -- cgit v1.2.3-70-g09d2