hnesk/browse-ocrd

clean temporary files

Closed this issue · 3 comments

ocrd_browser needs to store preview images in the OS' temporary files location. This can easily sum up to a few gigabytes for large workspaces.

IMHO it would be better to remove these files when closing (even if they could be re-used) to prevent partitions (or RAM disks) from filling up.

Correcting myself: not preview images, but the cloning of the workspace is the problem here.

I see 2 drawbacks:

  • extra storage requirements (esp. when not cleaned up afterwards; but how do you know this can be safely removed at on_close time?)
  • not all workspaces can be fully downloaded successfully (local file references might be wrong, or remote references temporarily unresolvable)

But I see that certain parts of the UI already allow modifying the workspace (like reorder immediately doing save_mets). What's the point in having a save_as then? 😕

hnesk commented

You are onto something there, I tried to fix this mess in #16. Needs some testing and thinking still...

hnesk commented

Now merged #16, should fix the unnecessary clones and empty workspaces.
If there are problems with loading/cloning of concrete workspaces feel free to open an issue for that.