diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-12-10 10:44:17 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-12-10 10:44:17 +0100 |
commit | 1f571a903dcf9dee07a1b1c464ff4e472ccc7abe (patch) | |
tree | 29d2e9660dce79a5572e6b8e7c623cfe3798b2b9 /main.go | |
parent | c71cf11fe495b250b6d057963fa0416e706e963b (diff) | |
download | gallery-1f571a903dcf9dee07a1b1c464ff4e472ccc7abe.tar.gz gallery-1f571a903dcf9dee07a1b1c464ff4e472ccc7abe.tar.xz gallery-1f571a903dcf9dee07a1b1c464ff4e472ccc7abe.zip |
Deep thought
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |