perf: reuse preview on apply instead of reprocessing
Pass the already-processed preview data URL when applying edits. The thumbnail updates instantly without triggering another process cycle. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,9 +89,15 @@
|
||||
editingImage = null;
|
||||
}
|
||||
|
||||
function handleApplyPipeline(imageId: string, config: PipelineConfig): void {
|
||||
function handleApplyPipeline(imageId: string, config: PipelineConfig, processedDataUrl: string | null): void {
|
||||
imagesStore.setPipelineOverride(imageId, config);
|
||||
imagesStore.reprocessImage(imageId, deviceStore.selected);
|
||||
if (processedDataUrl) {
|
||||
// Use the already-processed preview directly
|
||||
imagesStore.updateImage(imageId, { processedDataUrl });
|
||||
} else {
|
||||
// Fallback: reprocess if no preview available
|
||||
imagesStore.reprocessImage(imageId, deviceStore.selected);
|
||||
}
|
||||
}
|
||||
|
||||
function handleClearAll(): void {
|
||||
|
||||
Reference in New Issue
Block a user