2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-05 12:01:04 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Romain
dd282f92d4 chore(dependencies): update all dependencies to the latest version 2018-05-14 21:22:57 +02:00
Romain
81ee517062 feat(index): ignore files in a root #recycle folder (Synology recycle bin) 2017-12-10 23:34:32 +11:00
Romain
91528ad076 test(index): cleanup thumbsup.db between test runs, otherwise the test does nothing 2017-12-10 10:40:12 +11:00
Romain
d0bbf94b1c fix(index): don’t crash when trying to parse exiftool output for a badly encoded file 2017-12-09 23:22:20 +11:00
Romain
3e098e2328 Extract Handlebars helpers to prepare for theme structure + add unit tests 2017-11-28 07:53:51 +11:00
Romain
2a0a8d6631 Upgrade mock-fs to support Node 8 (includes dynamic require workaround) 2017-11-26 22:47:51 +11:00
Romain
cbf8a1f3b4 Don’t index media from Synology thumbnail folders (@eaDir) nor folders starting with “.” 2017-11-26 22:32:03 +11:00
Romain
ac520d40ad Fix case insensitive glob + add unit tests for globbing 2017-11-26 21:21:15 +11:00
Romain
24b2f9bd7c Major optimisations: SQLite index + faster disk glob + new exiftool streaming
1. Move from a JSON index to a SQLite database.
  - This allows the indexing to be interrupted & resumed
  - Updating the index consumes less RAM than loading / saving an entire JSON object
  - Loading the index consumes less RAM since it can be streamed, only exacting the properties we need every time (instead of loading all EXIF data in memory, only to discard most of it later)
  - These make a big difference when processing 10,000+ photos

2. Switch from <glob> to a manual <readdir>
  - Glob would take several hundred or GB of RAM when asked to find several thousand files
  - Manual approach with <micromatch> library does the same thing in a fraction of the time / memory usage

3. Exiftool optimisations
  - Run 1 exiftool process per CPU, still in batch mode (divide all files to be read into 1 bucket per CPU)
  - Stream the exiftool output instead of buffering it in memory
2017-11-24 22:08:59 +11:00