Skip to content

Commit

Permalink
Tuned source loading + perf tooling (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg authored Jun 17, 2023
2 parents 8bb0924 + 7832fa6 commit 8dd9381
Show file tree
Hide file tree
Showing 10 changed files with 891 additions and 96 deletions.
29 changes: 22 additions & 7 deletions defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,25 +169,25 @@ media:
sqlite:
path: photofield.thumbs.db
cost:
time: 5ms
time: 6ms

goexif:
extensions: [".jpg", ".jpeg"]
width: 256
height: 256
fit: "INSIDE"
cost:
time: 30ms # 15ms + extra cost
time_per_original_megapixel: 670us

image:
extensions: [".jpg", ".jpeg", ".png"]
cost:
time_per_original_megapixel: 90ms
time_per_original_megapixel: 71ms

thumb:
fit: "INSIDE"
cost:
time_per_resized_megapixel: 140ms
time_per_resized_megapixel: 70ms

ffmpeg:
fit: "INSIDE"
Expand All @@ -197,17 +197,16 @@ media:

sources:

# Internal thumbnail database
# # Internal thumbnail database
- type: sqlite


# Embedded JPEG thumbnails
# # # Embedded JPEG thumbnails
- type: goexif

# Native image decoding
- type: image


#
# Synology Moments / Photo Station thumbnails
#
Expand All @@ -218,6 +217,8 @@ media:
fit: "INSIDE"
width: 120
height: 120
cost:
time_per_resized_megapixel: 89ms

- name: SM
type: thumb
Expand All @@ -226,6 +227,8 @@ media:
fit: OUTSIDE
width: 240
height: 240
cost:
time_per_resized_megapixel: 70ms

- name: M
type: thumb
Expand All @@ -234,6 +237,8 @@ media:
fit: OUTSIDE
width: 320
height: 320
cost:
time_per_resized_megapixel: 66ms

- name: B
type: thumb
Expand All @@ -242,6 +247,8 @@ media:
fit: INSIDE
width: 640
height: 640
cost:
time_per_resized_megapixel: 42ms

- name: XL
type: thumb
Expand All @@ -250,6 +257,8 @@ media:
fit: OUTSIDE
width: 1280
height: 1280
cost:
time_per_resized_megapixel: 35ms

#
# Synology Moments / Photo Station video variants
Expand All @@ -275,16 +284,22 @@ media:
width: 256
height: 256
fit: INSIDE
cost:
time_per_original_megapixel: 120ms

- type: ffmpeg
width: 1280
height: 1280
fit: INSIDE
cost:
time_per_original_megapixel: 160ms

- type: ffmpeg
width: 4096
height: 4096
fit: INSIDE
cost:
time_per_original_megapixel: 180ms


# These sources are used for handling small thumbnails specifically for
Expand Down
Loading

0 comments on commit 8dd9381

Please sign in to comment.