Setting EXIF time zone slowdown

Having tech problems? Post them here and do not worry, there is always a solution for you.
Post Reply
User avatar
Quantumpanda
Posts: 5
Joined: Thu Oct 12, 2017 5:14 am
Contact:

Setting EXIF time zone slowdown

Post by Quantumpanda »

I recently discovered that since mid-May, images from my phone have been tagged with the incorrect EXIF time zone, so I'm attempting to fix that in all the images I've already downloaded. (I've already found the source of the problem on the phone and corrected that.) Since it's a single action, I figured that I should be able to do it directly from the Browser via the Action menu.

It works well enough—the files that get processed do change to the correct time zone—but the process seems to get progressively slower the more files it processes in a single selected group. The first five images are processed pretty quickly. After about ten to twenty, it's marginally but noticeably slower per file. At fifty files, it's annoyingly slow. At 100, it's excruciating. At about 250, it's going so slowly that it looks like it's locked up—it took more than five minutes to go from 253 files processed to 254. And the estimated time to complete keeps increasing correspondingly.

If instead of selecting all the files at once, I select them in smaller groups, the speed is the same for each file within a single group, but each new selected group starts over at full speed. The first five take about the same amount of time whether I've selected five, fifty, 500, or 5000. But I have roughly 7500 images to fix the time zone on. Selecting them in groups of, say, fifty at a time may cut the total processing time to a small fraction, but that means sitting there and selecting fifty images 150 times. So I can either tie up GraphicConverter (and correspondingly slow down other use of my computer) for the 24+ hours it would take to do all 7500 files in one go, or I can sit there manually selecting groups of fifty files every two minutes for five hours. (The time it would take me to write a script to automate it would negate the time saved in doing it manually, so that's not a practical option.)

If I had to guess at a cause for this, I'd lean towards some iterative loop in the process that's ballooning with each additional file processed. That's just a guess. I think it's something specific to the time zone change routine, because I don't see this behavior with other Action-menu metadata adjustments. I haven't tested all of them, but I do not see it with, say, changing the creation date to match the EXIF date.

This is happening in GraphicConverter 10.5 (2872) on Mac OS X 10.10.5. If there's any additional info I can supply to help track down this problem, just let me know.
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Setting EXIF time zone slowdown

Post by forum_adm »

I just call the exif tool for changing that exif tag.

What shows the memory usage in the activity monitor.
User avatar
Quantumpanda
Posts: 5
Joined: Thu Oct 12, 2017 5:14 am
Contact:

Re: Setting EXIF time zone slowdown

Post by Quantumpanda »

I did a new test run with a selection of 101 images in a folder of 7550, recording memory usage from Activity Monitor for GraphicConverter during the process. (The odd number is a result of how I've been selecting groups of files. My browser displays five images across. After each set, I've been using the keyboard to select the next group by right-arrowing to select the next file and shift-down-arrowing to add lines of five to the selection.)

Before selecting the 101 files, GC's total memory usage was 3.33 GB, with 2.85 GB as compressed memory. Memory pressure was green, with iStat Menus reporting 42%.

After selecting 101 files, but before starting the process, GC's total memory usage was 3.39 GB. Compressed memory remained at 2.85 GB, and pressure was still green. There was no immediate change upon selecting "Set EXIF time zone…" from the Action menu and clicking "OK".

About two minutes after starting the process, the progress window indicated 50 out of 101 files had been processed. GC's total memory usage had increased only mildly, by about 100 MB, to 3.50 GB. Compressed memory had dropped to 2.68 GB. Memory pressure remained green.

About four minutes later, the progress window showed that 100 out of 101 files had been processed. GC's total memory usage had increased a tiny bit to 3.53 GB, and compressed memory had decreased to 2.10 GB. Memory pressure was still green.

The progress window showed 2 seconds of remaining time at that point. Nothing in the progress window changed for another four minutes. At that time, about ten minutes after starting the process, the progress window closed. GC's total memory usage was 3.51 GB, and compressed memory had dropped down to 1.37 GB. Memory pressure remained green throughout the entire process, and the graph of memory pressure showed only a slight increase over the period of processing (up to 47%, according to iStat Menus), with a return to the initial level when the process completed.

Within about 30 seconds of that completion, Activity Monitor showed GC as "not responding", and attempting to do anything in GC brought up the busy spinner. This condition lasted for another three minutes, at which point I could then select another group of files to process. At that point, GC's total memory usage had dropped to 3.17 GB, with compressed memory unchanged. (Compressed memory slowly increased over the next several minutes as the operating system took idle cycles to do that.)

It doesn't look to me like it's a memory issue. My internal boot drive is a fast SSD, so swap shouldn't be a major contributor either, especially since memory pressure varied only slightly during the process. CPU maxed out during the process, but that's not unexpected or unusual for GC.
User avatar
Quantumpanda
Posts: 5
Joined: Thu Oct 12, 2017 5:14 am
Contact:

Re: Setting EXIF time zone slowdown

Post by Quantumpanda »

I've done a bit more research using exiftool on the command line. I don't know if GC's version of exiftool is available to me in the terminal—it's not in my $PATH, at any rate—so I installed it separately via Fink. The version of exiftool in GC is reported as 10.61, while Fink's latest update is 9.94.

The EXIF tags added by GC with the "Set EXIF time zone…" command are not recognized by exiftool 9.94, showing up as simply "Exif_0x9010", "Exif_0x9011", and "Exif_0x9012" in both tag name and description. Exiftool 10.61 in GC lists those same tags as "Offset Time", "Offset Time Original", and "Offset Time Digitized", respectively.

If I get a list of all the EXIF tags from exiftool 9.94 that it recognizes, it does not include any of those three tag names. There is, however, a writeable tag listed as TimeZoneOffset (and a handful of related tags that aren't writeable by exiftool). I do not know how that tag relates to the others, or if it is an old or deprecated tag (the command in exiftool that's supposed to show those flags isn't working for me the way the man page says it should). None of the images in question have this tag, either before or after GC sets the time zone.

Obviously, there's a lot I don't know about the EXIF specifications. While I'm willing to learn, the time I take to figure out all of this is time I'm not spending on the projects that make me money or provide other benefits. The time it would take me to figure out how to script or batch-change all of this from the command line isn't worth it.

I brought this up here because it doesn't make any sense for this command, and only this command, to take exponentially longer time to complete as it proceeds through a batch unless there's a bug in it, particularly since there doesn't appear to be any significant change in memory usage while it runs. Since you said it's just a call to exiftool, that bug could be in your calling routine or in exiftool itself. Should I take this up with the exiftool developer instead?
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Setting EXIF time zone slowdown

Post by forum_adm »

You can download the latest EXIFTool always from Phil Harveys web site.

The latest BETA of GC:
http://www.lemkesoft.org/beta.html

Uses the latest version 10.62.

The EXIF time zone tag is very new.
User avatar
forum_adm
Site Admin
Posts: 1814
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Setting EXIF time zone slowdown

Post by forum_adm »

Please recheck with the new GraphicConverter 10.5.1.

I ignore now all the directory refresh notifications of the file system during the change. That may solve your issue.
Post Reply