Slow write with Metadata Template

Started by DigPeter, April 17, 2014, 10:40:14 PM

Previous topic - Next topic

DigPeter

I have a simple template which writes a single leaf category to XMP::dc/title or XMP::dc/description.  This is taking on average 4 to 6 seconds per file - so 10 files can take up to  50 seconds to write.  This seems to be slow.

Mario

Logfile?
Show us your template (Export Attach).

Do you have IMatch set to write-back automatically?
Because Metadata templates only operate on the database normally, and this means typical update times of maybe 10ms per file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on April 18, 2014, 08:29:17 AM
Logfile?
Show us your template (Export Attach).
See attached.  The operation with 10 images took about 45secs.
Quote
Do you have IMatch set to write-back automatically?
Because Metadata templates only operate on the database normally, and this means typical update times of maybe 10ms per file.
Not set to automatic write-back. 

[attachment deleted by admin]

Mario

Your log file contains lines like:

PTMetabase::WriteBack successful for file [67291] 'C:\Users\Peter\Pictures\2014\1404\140416\20140416_SU45Q70406.jpg' in 3 s

which means that IMatch has written data to the actual file. Do you have propagation rules in place which are triggered by you applying the template?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on April 18, 2014, 03:15:32 PM
Your log file contains lines like:

PTMetabase::WriteBack successful for file [67291] 'C:\Users\Peter\Pictures\2014\1404\140416\20140416_SU45Q70406.jpg' in 3 s

which means that IMatch has written data to the actual file. Do you have propagation rules in place which are triggered by you applying the template?
I do not know what you mean bypropagation rules .  As you can see in the screen shot in the above zip folder, the template writes to XMP::dc\title .  In the case covered by the last post, I did a manual write-back after the the template action was complete.

Mario

On my system, running a MD template which sets copyright info, rights, and copies a few categories into the description takes 47ms, less than 0.1 seconds for 50 files.

In your log file, the first info logged after IMatch starts updating metadata are "folder not found" messages. This indicates a problem with the database (run diagnosis to check) or some file relation rule which refers to no longer existing folders.

Do you use file relations (version)? If so, which and are the rules valid?
I see that IMatch calculates Collection (for labels) and then runs a large number of category sort operations.
This is what takes the time.
In which view do you run the template (F&M, Catgeories, ...)?
Please export and attach your template so I can see it here. I wonder why it updates the collections and has to sort so many categories.
Or at least export your category tree and copy/paste the expression you use in your template. I could not reproduce this here with a 50,000 files database with 3,000 categories. Must be something specific.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on April 18, 2014, 07:45:27 PM
Do you use file relations (version)? If so, which and are the rules valid?
I have file relations connecting my original raw, master files on the external G drive with the versions on the internal C drive.  But this is not operating for some reason - (a problem which I have yet to get round to working out).  I have tried running the metadata template with the File relation both checked and unchecked and this makes no difference to the write time.  I have also tried it with the G drive both on and off line, again with no effect.
 
QuoteI see that IMatch calculates Collection (for labels) and then runs a large number of category sort operations.
This is what takes the time.
In which view do you run the template (F&M, Catgeories, ...)?
Media & folders.
QuotePlease export and attach your template so I can see it here. I wonder why it updates the collections and has to sort so many categories.
Attached.  The template used in the test is Assign species to dc title

QuoteOr at least export your category tree and copy/paste the expression you use in your template. I could not reproduce this here with a 50,000 files database with 3,000 categories. Must be something specific.
I have some 4000+ categories in @keywords.  I do not use regular categories, but do have formula categories, none of which would be related to the data being written in the test.  Exporting categories, I think only operates on regular categories, so would not show @keywords.  I attach the thesaurus which reflects @keywords.

[attachment deleted by admin]

DigPeter

Further to my last post,  I have created a new test database with some 1200 images.  I tried the metadata template again with 3 images and the resultwas almost instantaneous, so the problem seems to be with main database.   I attach the logfile for the new test database for comparison.

[attachment deleted by admin]