summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
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)