Repository navigation
Description
I said on #146 that I'm short on time these days, but when my own catalog sat at "14 of 38,556" for half an hour I couldn't resist. And once it went through in a few minutes, the endorphins kicked in ;-)
A data point from a real catalog, and a working branch.
Measured on main (964d933), macOS, Apple M5 Max: catalog 2026.lrcat with 38,545 photos (CR3 from an EOS R5 Mark II, Leica M11-P DNG, ORF, JPEG). 1.1 TB of originals on a USB SSD (exFAT, ~850 MB/s).
- Reading the catalog takes 1.6 s. Everything after that is probing the originals:
fs_hooks' probe reads each file whole and hashes it. That is 1.1 TB, about 22 min of reading alone at the measured rate. I didn't let it run to the end. - All 38k paths go to
ImportJob::prepare_filesas one batch.probe_allcounts into a localScanProgress, so the activity row stays at "14 of 38,556" the whole time. Its cancel flag is never set, so ✕ only takes effect after every file has been read. - Then
apply_preparedruns on the owner thread for ~5 s: XMP parsing, Lua parsing,crsmapping andapply_partialfor every photo (profiled). - On exFAT,
find_sidecar's fouris_filechecks per photo cost another 8–18 s. Nearly all of them ask for files that aren't there.
What my branch does (two commits, LRC-LIB-CATALOG-IMPORT):
lightcraft_raw::sparse::header_plansays which byte rangesprobe_infoandlightcraft_meta::extractread, given a buffer of the file's length in which only some ranges are loaded. That is everything but the bulk sample data. It keeps the first chunk's coding headers, a CR3's CRX headers, QP maps and CTMD track, and a RAF's compression header.preview_planalso loads whatembedded_previewneeds, for raws shown from their preview. NEF, ORF and PEF (their probe looks at samples) and non-raw files are read whole.- The Lightroom import uses that probe (
ImportOptions::headers_only). Raws probed this way get no content hash. A later import of a copy hashes same-size photos on demand (at most 16) and keeps the hash. LightroomJobprepares 256 photos at a time. Probing, XMP parsing and develop mapping run on the worker, and each batch is committed as it arrives. The progress counts each original as it is probed, and ✕ stops at the next file. A cancelled import keeps what was added as one undo step, without collections. Importing again continues via the import index and then adds the collections.- Sidecars are looked up in one listing per folder instead of four lookups per photo.
Results:
- Same catalog: 3 min 20 s end to end (CLI), 38,545 photos and 13 collections. User CPU dropped from ~600 s (an earlier version that read the CR3s whole) to 129 s.
- Bytes read on the raw.pixls.us corpus: CR3 2.7 %, DNG 2.4 %, CR2 3 %, RAF 6.4 %, RW2 7 %, ARW 7.5 %, SRW 17 %. The R5 Mark II CR3s are preview-only here (CRX "adaptive QP value" unsupported), so they are read with their 3 MB JPEG track, about 15 % of the file.
- Equivalence: for all 103 corpus raws,
probe_info,extractandembedded_previewon the partly loaded buffer equal the whole file, with the skipped bytes zero and again 0xFF. 961 of my own files gave an identicalProbeInfo, the hash aside. cargo xtask cipasses exceptexport_progress_and_cancel(Flaky test: mcp e2e export_progress_and_cancel finishes before its cancel arrives (parallel export lanes + 100 ms progress throttle) #674).
Related open work: #667 changes the same file and also factors out the SQLite fixture; I'd rebase onto it. #755 reads only the RAF preview window for previews; preview_plan covers CR3 and TIFF raws too and could back that loader. After #727, NEF could join the partial read. #798 (the 1 GiB limit) is untouched.
Questions before I open a PR:
- Is dropping the content hash for raws probed this way acceptable (duplicate check on demand, preview cache keyed by path and size), or should hashing happen later in a background pass?
- A cancelled import now keeps the photos added so far, where it used to be all-or-nothing. Is that the behaviour you want?
- One PR, or the raw-crate
sparsemodule first and the batched import second? - @lzjtugjc, @mrpdaemon: happy to align with LR-IMP-PREVIEW-READ: a preview reads the raw's header, not the raw (56.5 MB → 5.9 MB, 10 s → 1 s over SMB) #755 and LRC-LIB-CATALOG-IMPORT: find moved root folders relative to the catalog #667, whichever order suits you.
Activity
radialmonster commentedon Oct 10, 2026
On the R5 Mark II CR3s opening preview-only: main accepts adaptive QP values 131 to 167 (
crx.rs, the "Canon CRX adaptive QP value N" error). #829 adds 168, quantisation step 44, which an R50 C-RAW at high ISO uses. If the log line for your files saysadaptive QP value 168, #829 should decode them as raws, and they'd then fit your sparse plan without the 3 MB JPEG track.If it shows another value, could you share one file (Google Drive, or raw.pixls.us if it's a body/mode combination they don't have yet)? The two R5 Mark II C-RAW samples on raw.pixls.us decode with #829's branch.
ingolfteetz commentedon Oct 10, 2026
@radialmonster thanks for looking. It isn't QP 168: my R5 Mark II files fail with out-of-range values from a misparse, e.g.
Canon CRX adaptive QP value -21087. In a sample of 306 files, 174 fail on main, with values from −32401 to 32172 and none at 168, so #829 alone doesn't reach them. As you say, the two CC0 C-RAW samples on raw.pixls.us decode on main too; they just never hit the problem.Cause. The CRX 0x200 QP map starts with its first symbol as a 32-bit literal. Every later symbol is Rice-coded with a limited-length escape: 23 zeros, the terminating 1, then the symbol in 8 bits. That is the ITU-T T.87 escape layout for a 32-bit limit and 8-bit symbols, without its −1 offset. Main treats any 16-zero prefix as an escape followed by a 16-bit literal. That reads the first symbol the same way, which is all the R8 and R7 maps need. R5 Mark II maps (QP 150–162), though, jump by up to 12 where the Rice parameter is 0. That gives 18- to 22-zero prefixes, which are ordinary symbols, and real escapes (symbols 23 and 24).
Tested with
_A3A2841.CR3, ISO 1000), fully decoded and rendered: it matches the camera's embedded 8192 × 5464 JPEG at 100 %, with no steps in the bottom rows. The Bayer planes are 2825 rows, odd at every wavelet level.What changes (ready locally, PR not opened yet):
crx.rs: the first QP symbol is read as a 32-bit literal, and the escape is 23 zeros plus an 8-bit symbol.cr3.rs: in crop mode the R5 Mark II records itsIAD1valid area 128 px left of the image data, which starts after a strip filled with the black level. So 7883 and 7884 developed at 5112 × 3408 with a ~124 px black strip on the left. When the recommended crop overshoots the valid area, the area is now centred on the crop: 5088 × 3392, and the rank correlation with the camera JPEG goes from 0.884 to 0.993.RENDER_CACHE_VERSIONgoes to 43, which collides with CR3: decode CRX quantisation step 44 (QP 168), Canon EOS R50 C-RAW #829's bump; whichever merges second takes 44. The other overlaps with CR3: decode CRX quantisation step 44 (QP 168), Canon EOS R50 C-RAW #829 (the sameqp_maplines, tests next to each other) are textual only, and its QP-168 test passes under the new rule.lr-import-speedbranch without conflicts, andsparse_corpuspasses with the R5 Mark II files. They now probe as raws, so the sparse plan reads their headers and QP maps (2.6 % of the bytes for CR3 on the corpus) instead of the 3 MB JPEG track.cargo xtask cipasses exceptexport_progress_and_cancel(#674).radialmonster commentedon Oct 10, 2026
@ingolfteetz great find on the escape layout, and thanks for checking it across that many files. Please open the PR for the QP map. It's the part nothing else covers.
The crop-mode change is already in #754 (open, mergeable). It's the same rule: when the recommended crop overshoots the IAD1 area, the crop becomes the valid area. It gives 7883/7884 the same 5088 × 3392. You could leave
cr3.rsout of your PR, or base it on #754, so the two don't conflict. I'll rebase #829 for the cache version whichever merges first.ingolfteetz commentedon Oct 11, 2026
@radialmonster thanks, done: #915 has only the QP-map fix, without
cr3.rs, so it stays clear of #754. Like #829 it setsRENDER_CACHE_VERSIONto 43; whichever lands second takes 44.On the import speed itself, the actual subject of this issue: should I open a PR for that as well? The branch is ready. If so, I'd be glad of a quick word on the questions above, especially whether you'd prefer one PR, or the
lightcraft_raw::sparsemodule first and the batched import second.radialmonster commentedon Oct 11, 2026
@ingolfteetz thanks for #915. I'm a contributor, not a maintainer, so the maintainers have the final say. Here's my view:
I'd do two PRs:
lightcraft_raw::sparsefirst, then the batched import on top. The sparse module is pure and checked by your equivalence test (sameprobe_info/extract/embedded_previewas the whole file, with skipped bytes as 0 and 0xFF), so it can be reviewed and merged by itself. LR-IMP-PREVIEW-READ: a preview reads the raw's header, not the raw (56.5 MB → 5.9 MB, 10 s → 1 s over SMB) #755 could also usepreview_planonce it's in. The import PR then only covers behaviour (batches, progress, cancel, sidecar listing) and can rebase onto LRC-LIB-CATALOG-IMPORT: find moved root folders relative to the catalog #667.Without a hash, two things on main get weaker. I'd note both in the PR:
cmd/missing.rs) relinks a renamed file by size pluscontent_hash. A photo with no hash only matches by name and size.content_op(cmd/convert.rs) comparesinfo.content_hashwith the stored one, so the first full probe of such a photo counts as a content change and writes aSetContentop. Check that this doesn't add an undo step or reset previews on a normal refresh.A low-priority background pass that fills in missing hashes later would fix both, and could be a follow-up.
Keeping what was added, as one undo step, and continuing on the next import, sounds right to me for a 38k-photo catalog. All-or-nothing makes a late cancel throw away 20 minutes of work.
ingolfteetz commentedon Oct 11, 2026
@radialmonster thanks, that's the split I went with: #961 is step 1,
lightcraft_raw::sparseon its own, with no behaviour change and the equivalence test (skipped bytes as 0 and as 0xFF on the whole corpus).Step 2, the batched import, follows on top of it and on #667. Two things from your list will be in it:
Good to hear the cancel behaviour makes sense to you. I'll wait for the maintainers on all three before step 2.
lzjtugjc commentedon Oct 11, 2026
Thanks — with #961 in (batch 31), I picked up the preview side @radialmonster mentioned ("#755 could also use
preview_planonce it's in"). #755 landed in the same batch (e4a248c9) and it is RAF-only:preview_windowparses the RAF header pointer itself, so CR3, TIFF raws whose preview pointer sits past the 4 KiB prefix, and the scan-based formats still fall back to reading the whole file.I'd like to close that by asking
preview_planfor the ranges instead of parsing a format by hand, so every format the plan can describe reads a fraction of the file — a CR3's JPEG track, a TIFF raw's preview strips (NEF / ARW / CR2 / DNG / RW2 / 3FR …). It would also drop the "pointer past the prefix" limitation #755 documents, and the duplicated RAF header parse (sparse::raf_planalready covers those fields).The guarantee the loader needs is the one your module was built on: with
preview = truethe plan reachesReady, andembedded_previewon the partly loaded buffer equals the whole file's with the skipped bytes both 0 and 0xFF (crates/raw/tests/sparse_corpus.rs). One gap I'd fix in the same PR: those preview assertions sit inside theheader_plan == Readybranch, so for NEF / ORF / PEF — whose header probe reads samples and returnsWhole— the preview plan is never exercised today. Your R5 Mark II numbers are the same shape as the RAF ones #755 measured: a ~3 MB JPEG track is read out of the whole file, and today every unedited CR3 thumbnail still pays for the whole file (Canon is the largest bucket in the project's own gap ranking).Two questions before I write it:
Memory vs I/O.
preview_planis asked about a buffer of the file's full length with onlyloadedholding bytes. Reusing that as-is means a full-length (zero-filled) buffer: only the planned ranges are read and only their pages are touched, so RSS stays near the ranges, but the allocation is the file's length. The loader today holds the whole file and countslen * 2at the memory gate. Do you prefer (a) keep the sparse buffer and count the planned ranges at the gate, or (b) use the plan only to discover ranges and read them into a compact buffer (which means assembling multi-strip previews)?Overlap with step 2. Step 2 is the import side (
headers_only, batches, progress, cancel); this is the display side — thePreviewLoaderthe grid, the loupe and the face scan go through. I read that as non-overlapping, but if you'd rather carry the loader change in your branch, or want it based on LRC-LIB-CATALOG-IMPORT: find moved root folders relative to the catalog #667 first, say so and I'll stay out.ingolfteetz commentedon Oct 11, 2026
@lzjtugjc sounds like a good use of it to me, though the maintainers have the final say, of course. From my side I don't see an overlap with step 2.
lightcraft_meta::embeddedcopies the whole buffer for them (exif: Some(bytes.to_vec())), and the preview path reaches it throughextract(preview_orientation), so every page gets touched and duplicated. For CR3 and RAF only the planned ranges are touched. Borrowing the EXIF block instead of copying it might be worth a look, since it would also save a full copy on every raw probe today.memory::release()after each file didn't shrink it. It's allocator cache rather than held memory, but it shows in RSS.files.rs, but only next tofs_hooks:fs_header_probe, a partial-read loop (probe_partial: a prefix, then the ranges the plan names, up to 16 rounds, giving up past 60 % of the file) andembedded_preview_size(JPEG header first, decode as fallback). If the loader ends up needing the same loop, I'd be glad to factor it into a shared helper in whichever PR lands second.On the test gap: good catch. Running the preview assertions whenever
preview_planreachesReady, independent of the header plan, makes sense to me. One thing to be aware of: todaypreview_planreturnsWholefor NEF, ORF and PEF anyway, because they share the header plan's early exit for formats whose header probe reads samples. I don't think previews need that exit, so lifting it in preview mode might bring at least NEF and PEF in (ORF's raw IFD may first need to be recognised as raw). The corpus test would tell.lzjtugjc commentedon Oct 11, 2026
PR is up: #1020.
planned_previewincrates/engine/src/files.rsreads the rangespreview_plannames, and the guards we discussed keep the whole-file path:Whole, a plan that wants more than 60 % of the file, a container that declares Adobe RGB (the whole-file path applies it; a JPEG-only decode assumes sRGB), and an orientation only the whole file can show when the preview JPEG carries none.The corpus test now asks
preview_planfor every file, so lifting the NEF/PEF exit in preview mode would be caught either way if you want to try it in step 2 — and I'm happy to fold the read loop into a shared helper in whichever of the two PRs lands second.LR-IMP-PREVIEW-READ: a CR3 or a TIFF raw's preview is read from the p…
Eliksir67 commentedon Oct 11, 2026
Hello, here is my contribution to this topic, based on my own tests:
Investigated and written with Claude Code.
The normal import dialog has the same cost, before the user sees anything.
library.importPreview(import::scan_with→probe_all) runs the file probe fromfs_hooks(crates/engine/src/files.rs), which reads every file whole (std::fs::read) to hash it, on up to 8 threads at once (workers,import.rs). The dialog's thumbnails then go throughfs_preview_loader, which reads each raw whole again to find its embedded preview, unless the bytes are still cached.Measured with
lightcraft-cli run --library <empty> library.importPreview paths=[<folder>](v0.6.0, Linux), page cache dropped first: 250 Canon raws, 6.9 GB, on an internal SATA hard disk (NTFS through ntfs-3g): 166 s before any candidate is returned. Reading the same files cold withcatorddtakes about 144 s (about 48 MB/s on this disk), so the scan already runs close to the disk's speed: the wait is the full read of every file itself. On an SSD with the files in the page cache, the same scan of 15 raws (491 MB) takes 0.19 s.Edit: an earlier version of this comment quoted a 41.7 s sequential read and suggested reading one file at a time on hard disks; that read was not cold (part of the files was still in the page cache). With the cache dropped, one reader at a time only brought the scan from 166 s to 145 s here, so that suggestion is withdrawn.
Now that
header_planis on main (#961), could step 2's partial probe and on-demand duplicate check also apply tolibrary.importPreviewand the normal import (ImportJob::prepare_files), not only toheaders_onlyLightroom catalog imports? The preview read from #1020 would cover the dialog's thumbnails. With the share of bytes measured in the issue body (CR2 3 %, CR3 2.7 %), the scan above would read about 200 MB instead of 6.9 GB.What the full content hash is used for today, as far as I can see, in case it helps scope step 2:
by_hashinimport.rs);copy_into), which reads the whole file anyway and could hash it while copying;sync.rs);media::content_key); without a hash it falls back tofile:path:size, so a moved file loses its cached thumbnails.One thought on the duplicate check, in case it is useful: comparing file sizes first, then a partial hash only for files of the same size, and the full hash only when those match, would keep full reads for true duplicates. The partial hash could perhaps cover the ranges
header_plan(#961) already reads, plus the end of the file, so it would cost little more than the header read itself.I hope this is useful. Many thanks to the developers!
youyoulyz commentedon Oct 13, 2026
Adding a network-share data point, since the SMB worst case is considerably worse than the exFAT one:
sample(1)shows the same stack:probe_allspawns 8 workers, eachfs_hooks→fs::readof the whole file → siphash128; two parked inWorkGateat the same time.lsof10 s apart shows a fresh set of open DNGs each time — I/O-bound, not hung.headers_onlyshould cut this to low single-digit % of bytes read, like #755 did for previews (56.5 MB → 5.9 MB, 10 s → 1 s over SMB). Happy to run a test build of the branch against this catalog.Nehle commentedon Oct 13, 2026
I can confirm this is a significant issue for large NAS-based Lightroom libraries.
I'm currently importing a Lightroom Classic catalog with 112,622 photos, referencing a photo archive of approximately 2.6 TB on a Synology NAS over SMB, using LightCraft 0.6.0 on Windows.
The import has been running for more than two days, with sustained network reads of approximately 300 Mbps (30–40 MB/s from the NAS).
The progress indicator initially remained at
14 of 14for several hours before changing to14 of 112622. It has not advanced since, despite continuous network activity.I haven't seen any changes committed to the destination LightCraft catalog yet.
I've looked through the proposed optimization and agree that sparse RAW probing, batching and proper progress reporting would be a major improvement.
I'd also suggest considering a metadata-first migration mode in the longer term. For an existing Lightroom catalog, it should be possible to import the photo records, collections, ratings and metadata without immediately accessing every original file, then perform verification and hashing as optional background work.
Happy to provide additional diagnostics or test the optimized importer against this larger
ingolfteetz commentedon Oct 14, 2026
Step 2 is up: #1735. It builds on #961 and on #1024 (@rwoldberg's read progress and cancel are kept).
fs_header_probe); the read loop is now shared with LR-IMP-PREVIEW-READ: a CR3 or a TIFF raw's preview is read from the plan's ranges #1020'splanned_preview(read_planned), as discussed, @lzjtugjc.@youyoulyz @Nehle thanks for the numbers from SMB; they make the case better than mine. If you'd like to try it before it's reviewed, the branch is
lr-catalog-import-batchesin ingolfteetz/lightcraft:A run against a network share would be the most useful data point, since I could only measure a local USB drive. @Nehle, an import that is already running can't switch over, but with this branch a cancelled import keeps the photos it added. The metadata-first idea sounds good to me as a later step: this PR still reads each original's headers, but nothing more.
@Eliksir67 thanks for measuring the normal import; I agree the same approach could help there. I'd keep it out of #1735, which only changes the Lightroom import and already overlaps with #1014 and #842, and see it as a possible step 3, if the maintainers want it:
copy_intoreads every byte anyway), so they'd keep a full hash without an extra read.The parallel probe on hard disks seems worth its own look; with header reads the reads get small, so the seeks matter even more there. I'd be glad to take step 3 on once step 2 is in, unless someone else would like to.
youyoulyz commentedon Oct 14, 2026
A network-share run of #1735, as requested (same share as the SMB numbers I quoted):
lr-catalog-import-batches(0848ef2):lightcraft-cli run --library <fresh local library> library.importLightroom path=…Results:
catalog.loggrows throughout and is compacted to a snapshot at the end. A mid-runsample(1)shows exactly the new path:LightroomJob::next_batch→probe_all→fs_header_probe→read_planned.@Eliksir67's point about hard disks applies directly: with small reads, seeks and round trips dominate. Coalescing the planned ranges per file, or a latency-aware read plan for network volumes, could make this a real win here too — happy to re-run anything you'd like to try.
Source catalog and originals verified untouched (md5s + mtimes before/after); the import is add-in-place.
LR-IMP-PREVIEW-READ: a CR3 or a TIFF raw's preview is read from the p…
docs: add user docs for LightCraft
Nehle commentedon Oct 15, 2026
Follow-up on my earlier SMB test: I've now completed an import using the
lr-catalog-import-batchesbranch from PR #1735.Environment
Observations
The new importer is a substantial usability improvement over 0.6.0:
14 of 112622.One correctness issue: None of my Lightroom collections appeared after import.
I've verified directly against the source
.lrcatSQLite database that it contains 51 collection records, 46 of which havesystemOnly = 0(30 ordinary collections, 12 smart collections, 2 groups and 2 print collections). The destination library contains no corresponding albums.I observed the same missing-collections behavior with the original 0.6.0 importer, so this appears unrelated to the optimization in #1735.
I'll report the collection issue separately with the available diagnostics.
Overall, the new importer is a major improvement, particularly the incremental commits and meaningful progress reporting. Thanks for the work on this!
ingolfteetz commentedon Oct 16, 2026
@youyoulyz @Nehle thank you both for running the branch on real network shares. That's exactly what I couldn't measure here.
@youyoulyz, SMB throughput. You're right: on your share the many small reads cost more in round trips than they save in bytes. Two things stand out:
read_plannedissues one seek and read per range, over up to 16 rounds, which is the worst case for SMB latency. Merging ranges that sit close together into one read, and a larger first read than the current 512 KB, should cut the round trips without reading much more. I'd do that as a small follow-up rather than in LRC-LIB-CATALOG-IMPORT: Lightroom catalogs import in batches from the originals' headers (step 2 of #832) #1735, unless the maintainers prefer it in there. I'll ping you when there's something to re-run.@Nehle, missing collections. Glad the import itself went through. One thing to check: collections are only added once every batch has arrived. If the import ended with an error or was cancelled, the photos stay but the collections don't. Did the result dialog say "Lightroom import complete" or "cancelled"/an error, and did it list any warnings? If it stopped early, importing the same catalog again into the same library should skip the photos already there and add the collections at the end. If the dialog said complete and there are still no albums, that's a bug I'd like to look at; your separate issue would be the right place for it.
ingolfteetz commentedon Oct 16, 2026
@youyoulyz the follow-up is up as #2051 (stacked on #1735). Counting reads per file showed the main cause: on tiled DNGs from Adobe's converter, the plan asked for the one-byte pad after every odd-length tile, so it made 49 to 241 separate reads per file. On the raw.pixls.us DNGs that is now 2 reads, and RAF files go from 7 reads to 4. Each read is now at least 64 KiB, and ranges that sit close together are read as one.
If you have time for another run on your share, the branch is
lr-import-coalesce-readsin ingolfteetz/lightcraft:Wall time and bytes read, as in your last run, would show whether this closes the gap. If the ~7.5 MB per file stays, those DNGs probably take another path, and one or two of them would help me find out which.
youyoulyz commentedon Oct 17, 2026
Re-ran on my share with #2051 (
lr-import-coalesce-reads, 6e1880c) — same NAS, same catalog, fresh local library, same measurement method:So: 20× faster and 4× fewer bytes — the round-trip cost is gone and the run is now CPU-bound, not wait-bound (mid-run throughput 46 MB/s, was ~12–15 MB/s). A mid-run stack still shows
next_batch→probe_all→fs_header_probe. Import result: 8,711 photos, 7 collections. (failedis 0 this time — the 135 missing-file photos are now recorded rather than reported, a behaviour difference from main since my #1735 run, not from your PR.)DNG origin: Sony ILCE-7RM3 (A7R III), converted to DNG by Lightroom Classic's "Convert to DNG" at import — Adobe-tiled DNGs, matching your diagnosis. Per-file bytes are now much closer to your 2.4 % estimate; if the remaining ~0.7 MB/file above it still matters, I can ask about sharing one or two samples to check whether a minority of files still takes a whole read.
Either way, this closes the gap — thanks for the fast turnaround.
Eliksir67 commentedon Oct 17, 2026
Hello, here are the results of #2051 on a slower setup, in case they help.
Investigated and written with Claude Code.
library.importLightroomfromlr-import-coalesce-reads(6e1880c), fresh local library.Results:
One thing that came up: the Lightroom catalog records the originals under
E:/Raw, which doesn't exist on Linux, so every photo would have been imported as missing. For this test the import was run from a folder holdingE:/Rawas a link to the share, since the recorded Windows path seems to be resolved against the current folder. Would it make sense, before the import starts, to list the root folders that can't be found and ask where each one is now? A catalog usually has few root folders, and the photos would then be linked from the start (and read from their headers) rather than relinked afterwards. #1116 seems related, but applies after the import.Thanks for the work on this import, the difference is very visible on this NAS.
Nehle commentedon Oct 17, 2026
Follow-up with results from a full-scale benchmark of the optimized Lightroom importer in #2051.
Test environment
OS: Windows
Build: LightCraft 0.8.0 development branch, commit
6e1880ca337ec2dda6d7560066ab841f374880ebImporter:
lightcraft-cli, runninglibrary.importLightroomagainst a fresh librarySource catalog: 112,622 Lightroom photo records
Photo archive: Approximately 2.6 TB on a Synology DS418j with mechanical HDDs
Connection: NAS on gigabit Ethernet; PC on Wi-Fi 6 (780 Mbps negotiated link rate)
Destination library: Local SSD
Benchmark results
The network figures were captured from Windows network-adapter byte counters sampled every two seconds. They include all traffic on the adapter, not exclusively LightCraft's SMB traffic, so they should be treated as approximate upper bounds on LightCraft's network consumption.
Network usage was highly bursty, with extended periods of near-zero traffic between reads.
Compared with 0.6.0, the behavior is substantially better: the earlier importer performed sustained reads around 30–40 MB/s, provided little meaningful progress, and took more than two days in my previous test.
However, I don't have reliable end-to-end timing for the previous branches, so I can't quantify the speedup accurately.
Import result: finalization failed
The CLI eventually returned:
The photo-processing phase persisted its results, but none of the Lightroom collections were imported.
This is the same missing-collections behavior I observed with both 0.6.0 and #1735, but the CLI finally exposed a concrete error.
I've opened a separate issue for the collection-finalization failure: #2165.
The error appears to originate in album parent validation during Lightroom collection creation, rather than the optimized RAW-reading pipeline.
Benchmarking observations
I also monitored import progress by periodically inspecting the destination catalog's persisted state.
A few observations that may be useful:
The importer persisted photo additions incrementally, but the observable count often advanced in jumps of approximately 2,560 photos (10 × 256).
Because progress was committed in relatively large increments, short-window throughput estimates were misleading.
A rolling average over several commit intervals gave a more stable ETA.
The CLI import command didn't provide useful intermediate progress output, so monitoring required inspecting the destination library separately.
A separate
library.inspectLightroominvocation appeared to stall after reading approximately 1.06 GB from the source catalog, with no further CPU or disk activity observed. I bypassed inspection for the successful benchmark run.A structured CLI progress stream would make future benchmarking significantly easier, especially for large catalogs.
Overall
The optimization is a substantial improvement in network efficiency and import behavior for this 112k-photo catalog on a relatively modest NAS.
The remaining issue is correctness: after several hours of photo processing, collection finalization fails, and no Lightroom identity index is persisted.
I'm happy to provide the benchmark CSVs, CLI logs, or additional diagnostics if useful. Thanks for the continued work on these optimizations!
ingolfteetz commentedon Oct 18, 2026
Thanks @youyoulyz, @Eliksir67 and @Nehle for running #2051 on your NAS setups. Three different setups make the picture much clearer:
I've added them to #2051's description.
@youyoulyz, no need for samples, I think: 1.8 MB of a ~45 MB DNG is about 4 %, close to what the corpus shows.
@Eliksir67, listing the catalog's root folders that can't be found before the import starts, and asking where each one is now, sounds very useful, especially for a catalog moved from Windows to Linux or macOS. I'd see it as its own step after #1735, and #1116 might be a natural home for it. That's up to the maintainers.
@Nehle, thanks for tracking down the collections error. I'll follow up in #2165.
SETTINGS-LOOK: the Classic Settings window shows every tab and reads …