bug(gamut): iccgamut -d 50.0 is surface density, not a directory #112

Closed
opened 2026-08-26 15:08:59 +01:00 by gronod · 1 comment
Owner
Field Value
Labels Kind/Bug, Priority/Medium
Priority Medium
Milestone v0.3.3 hotfix
Related #57, #89
Branch fix/iccgamut-density (from development)
Pair with

Description

extract_gamut in commands.rs invokes:

iccgamut -v -d 50.0 {profile}

Argyll iccgamut -d s is surface point density (typical useful range about 1–10), not a directory. Working directory is already set separately via ProcessManager::spawn(..., cwd). Density 50 produces a very heavy .gam (thousands of vertices), which then hits the O(n²) duplicate filter in compute3DConvexHull.

This was flagged before v0.2 and is still present in v0.3.2.

Current behaviour

let args = vec![
    "-v".to_string(),
    "-d".to_string(),
    "50.0".to_string(),
    resolved_path,
];

There is no build_iccgamut_args helper and no unit test locking the argv.

Proposed solution

  • Change -d to 10, or omit -d and use the Argyll default.
  • Do not pass the parent directory as -d.
  • Keep cwd = profile parent so {basename}.gam lands next to the .icc / .icm.
  • Extract build_iccgamut_args and add a unit test (there is none today).
  • Do not add -w unless VRML output is still required. It is not required for .gam.

Files

  • src-tauri/src/commands.rsextract_gamut, new build_iccgamut_args, unit test

Acceptance criteria

  • iccgamut argv is -v -d 10 {resolved_profile} (or without -d).
  • After a successful colprof, {cwd}/{basename}.gam exists and Stage 5 loads a mesh.
  • Hull generation on the bundled src/assets/sRGB.gam plus a typical printer .gam completes without UI freeze (under 200 ms on 500–1500 vertices).
  • Unit test locks the argv.

Dependencies

None. Independent of averaging work.

| Field | Value | |---|---| | Labels | `Kind/Bug`, `Priority/Medium` | | Priority | Medium | | Milestone | v0.3.3 hotfix | | Related | #57, #89 | | Branch | `fix/iccgamut-density` (from `development`) | | Pair with | — | ## Description `extract_gamut` in `commands.rs` invokes: ```text iccgamut -v -d 50.0 {profile} ``` Argyll `iccgamut -d s` is **surface point density** (typical useful range about 1–10), not a directory. Working directory is already set separately via `ProcessManager::spawn(..., cwd)`. Density 50 produces a very heavy `.gam` (thousands of vertices), which then hits the O(n²) duplicate filter in `compute3DConvexHull`. This was flagged before v0.2 and is still present in v0.3.2. ## Current behaviour ```rust let args = vec![ "-v".to_string(), "-d".to_string(), "50.0".to_string(), resolved_path, ]; ``` There is no `build_iccgamut_args` helper and no unit test locking the argv. ## Proposed solution - Change `-d` to `10`, or omit `-d` and use the Argyll default. - Do **not** pass the parent directory as `-d`. - Keep `cwd` = profile parent so `{basename}.gam` lands next to the `.icc` / `.icm`. - Extract `build_iccgamut_args` and add a unit test (there is none today). - Do not add `-w` unless VRML output is still required. It is not required for `.gam`. ## Files - `src-tauri/src/commands.rs` — `extract_gamut`, new `build_iccgamut_args`, unit test ## Acceptance criteria - [ ] `iccgamut` argv is `-v -d 10 {resolved_profile}` (or without `-d`). - [ ] After a successful `colprof`, `{cwd}/{basename}.gam` exists and Stage 5 loads a mesh. - [ ] Hull generation on the bundled `src/assets/sRGB.gam` plus a typical printer `.gam` completes without UI freeze (under 200 ms on 500–1500 vertices). - [ ] Unit test locks the argv. ## Dependencies None. Independent of averaging work.
gronod added this to the v0.3.3 Hot fixes milestone 2026-08-26 15:08:59 +01:00
gronod added the Kind/Bug
Reviewed
Confirmed
1
Priority
Medium
3
labels 2026-08-26 15:08:59 +01:00
gronod changed title from # bug(gamut): iccgamut -d 50.0 is surface density, not a directory to bug(gamut): iccgamut -d 50.0 is surface density, not a directory 2026-08-27 15:30:30 +01:00
Author
Owner

Resolved via PR #121. Extracted build_iccgamut_args with surface density -d 10 and added unit test.

Resolved via PR #121. Extracted `build_iccgamut_args` with surface density `-d 10` and added unit test.
Sign in to join this conversation.