Repository navigation
Mitigate slow Auto-paint searches on high-color photos - #154
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small unquantized photos can start minutes of Enhanced Auto-paint work because search cost scales with distinct target colors. This adds guidance before expensive searches and an explicit way to stop them.
Refs #103.
Changes
Measurements and equivalence
The revised 1,024-target advisory comes from a fixed-seed Balanced / Detailed sweep with 12 repeats: 512 targets completed in 12.134 seconds, 1,024 in 19.574 seconds, and 2,048 in 36.557 seconds. This replaces the initial cutoff based only on Fast / Compact. The warning is a color-count advisory, not a runtime limit or ETA; smaller palettes can still be expensive with deeper search or more filaments.
At 142,066 synthetic targets, median scoring time per 24 candidates changed from 17.975 to 16.878 seconds (6.1% less time). Smaller palettes had mixed timing results, and large repeated searches remain expensive. This workload is not the unavailable original photo. Recorded scoring fingerprints match at every benchmark count. Runtime-portable regression tests compare complete final stacks and exact scores with frozen pre-change scoring functions, using seed 12345 for all 12 existing enhanced image/profile cases and four synthetic searches.
Benchmark method, full timings, threshold rationale, and raw samples.
Validation
npm run lintnpx tsc -bnpm run check:i18nnpm test: all 1,133 tests passed on the current revisiontest:e2e:docsand three repetitions of the guidance/cancel specsBrowser verification used private port 5287, with its listener confirmed to belong to this worktree.