Performance: check for existing files *before* doing the processing on a picture

Bug #497594 reported by Jeff Fortin Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Confirmed
Wishlist
Unassigned
phatch (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: phatch

Currently, if you uncheck the "Overwrite existing images" option, phatch still processes the image before trying to check if it should be saved or not.

I know this is not easy to fix, but ideally, when I have a thousand images to process and launch the batch job multiple times, it should just continue where it left off, without reprocessing images that already have an existing output file.

Revision history for this message
Stani (stani) wrote :

These are two different issues:
1) check for existing files *before* doing the processing on a picture
2) Resuming a session with (thousand) images

2 could be much more easy to fix. We could provide a "Tools>Resume Session" entry. This invokes a GUI where you can choose from previous unfinished sessions and have an overview of finished and unfinished images.

1 will be very hard if not impossible under certain conditions. It would only be possible if Phatch could ignore variable changes in the save action. For example if Phatch uses an imagemagick action it is impossible to know the new image dimensions, but also for autocrop etc ... As ignoring variable changes will lead to incorrect results and possibly harm the reputation of Phatch, I don't feel it is worth the effort.

What is your reaction?

Changed in phatch (Ubuntu):
assignee: nobody → stani (stani)
status: New → Incomplete
Changed in phatch:
assignee: nobody → stani (stani)
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
Jeff Fortin Tam (kiddo) wrote : Re: [Bug 497594] Re: performance: check for existing files *before* doing the processing on a picture

Yes, basically #2 makes sense :) this was the main reason/use case I had
in mind.

Stani (stani)
Changed in phatch:
status: Incomplete → Confirmed
Changed in phatch (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Ken Seehart (kenseehart) wrote :

How about keeping a session file in the target directory which contains metadata: timestamp, sufficient information to resume a session that ended.

if a session file exists in the target directory:
    if the session metadata matches the current batch specification (actions, parameters, etc):
        resume the batch
    else:
        ask the user what to do, and do it
else:
    write a session file in the target directory,
    do the batch

delete the session file (after finishing a batch)

Revision history for this message
Stani (stani) wrote :

@Ken

That is what I had in mind with 2. Some minor changes:

- I would store the session information in Phatchs user cache folder
- The session info should always be cleared if:
   - The whole batch process is done
   - The user does not resume a previous session
- The UI could be implemented like this if session info is present:
   1) Add dynamically a 'Resume previous session' checkbox to the execute dialog box, which is checked by default
   2) Same as above, but leave it unchecked by default
   3) After batch in the execute dialog box is pressed, show a separate 'Do you want to resume previous session?' YES-NO dialog

@Ken, Jean-François Fortin Tam: Which of the 3 UI solutions above do you prefer?

Changed in phatch:
assignee: stani (stani) → Ken Seehart (kenseehart)
Changed in phatch (Ubuntu):
assignee: stani (stani) → Ken Seehart (kenseehart)
Changed in phatch:
milestone: none → 0.2.7
Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

I'm hesitating between option #1 and #3. If you implement #3, it should not be YES/NO, it should have clear button labels. It could look like this:

_________________________________________
| Resume session? X|
---------------------------------------------------------------
| Some of these files have already been |
| processed. Do you want to skip them? |
| |
| [[ Skip existing files ]] [ Replace existing files ] |
---------------------------------------------------------------

Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

Oh, my pretty ascii art :(

Stani (stani)
Changed in phatch:
milestone: 0.2.7 → 0.2.8
Revision history for this message
Ken Seehart (kenseehart) wrote :

I'm pretty busy with my day job so I don't know when I'd be able to get to this. Please feel free to reassign this to someone else (I'll make another note here if I start working on it).

Revision history for this message
Stani (stani) wrote :

@Ken
Ok, I'll remove you from bug assignments so other people feel free to pick up the bug. In case you have again time, reassign them to yourself.

Thanks for the update!

Changed in phatch:
assignee: Ken Seehart (kenseehart) → nobody
Changed in phatch (Ubuntu):
assignee: Ken Seehart (kenseehart) → nobody
Stani (stani)
summary: - performance: check for existing files *before* doing the processing on a
+ Performance: check for existing files *before* doing the processing on a
picture
Revision history for this message
Stani (stani) wrote :

Can some MOTU put the importance of this bug to wishlist? (It is more a feature request.)

Changed in phatch (Ubuntu):
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.