Files
Oxicloud/.gitignore
T
DioCrafts fd5808c157 perf(thumbnails): shrink-on-load JPEG decode (1.8-2× faster, 5-15× less RAM)
Decode JPEGs at the smallest DCT scale (1/8·1/4·1/2·1/1) whose long axis is
still ≥ the largest needed thumbnail (800px), via jpeg-decoder, instead of a
full-resolution decode through the image crate. The full-res bitmap — the
dominant time and RAM cost — is never materialised. PNG/GIF/WebP and unusual
JPEG colour spaces (CMYK / 16-bit grey) fall back to a full decode.

Extracts the shared decode + EXIF-orientation logic into decode_oriented(),
removing the duplication that existed between render_thumbnail_from_data and
render_all_thumbnails_from_data.

Measured on 14 cores (see benches/BASELINE.md):
- render_all 1.8-2.0× faster (12MP 111->61ms, 48MP 398->203ms)
- peak heap 5.5-14.8× lower, now decoupled from source MP (~18-25MB regardless)
- saturated throughput 3-3.6× (parallel efficiency 4.9×->8.5×)
- quality SSIM 0.987-0.999 (>=0.98 gate), PSNR 47-55dB

Also adds the Phase 0 benchmark harness (gated behind the `bench` feature, zero
prod impact): deterministic image corpus (src/bench_support.rs), criterion
latency bench (benches/thumbnails.rs), and a peak-RAM/throughput/SSIM harness
(examples/bench_thumbnails_mem.rs). Baseline + before/after in benches/BASELINE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 15:13:03 +02:00

121 lines
2.1 KiB
Plaintext

# Generated by Cargo
/target/
**/target/
# Processed static assets (generated by build.rs in release mode)
/static-dist/
# Built plugin bundles (just plugin-example-zip)
/dist/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Rust debug symbols
*.dSYM/
*.su
*.idb
# Build cache (keep .cargo/config.toml for project build settings, keep audit config)
.cargo/*
!.cargo/config.toml
!.cargo/audit.toml
# temporary file to tools
tmp/
# Visual Studio Code directory
.vscode/
# JetBrains IDEs
.idea/
# MacOS specific
.DS_Store
.AppleDouble
.LSOverride
# Linux specific
*~
.directory
.Trash-*
# Windows specific
Thumbs.db
ehthumbs.db
Desktop.ini
# Node.js (if used for frontend)
node_modules/
npm-debug.log
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Docker Compose local overrides (e.g. dev-only bind mounts)
docker-compose.override.yml
# Log files
*.log
logs/
# Storage data (user files, blobs — never commit)
storage/
# TLS certificates and private keys — NEVER commit
*.pem
*.key
*.p12
*.pfx
*.crt
*.csr
# Temporary files
*.tmp
*.bak
*.swp
*.swo
nohup.out
# Generated files (OpenAPI spec, etc.)
resources/gen/
# Helm chart dependencies
charts/*/charts/*
# Playwright
tests/e2e/node_modules/
tests/e2e/test-results/
tests/e2e/blob-report/
tests/e2e/playwright/.cache/
tests/e2e/playwright/.auth/
# Test fixtures generated on-the-fly by tests/api/run.sh
tests/fixtures/chunk-over-cap-*.bin
wasm/oxicloud-hash/target/
# devenv / direnv
.devenv/
.direnv/
.devenv-state/
# K6 load-test raw run outputs and per-run storage (baseline is committed)
tests/load/results/*.json
tests/load/storage/
# Phase 0 perf-bench corpus — generated deterministically on first
# `cargo bench --features bench`; drop real photos here (same filenames) to
# benchmark against real data. (target/ already ignored, covers the JSON dump.)
benches/corpus/