Page 1 of 2

Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 10:51 am
by mkc73
I have xnview settings set so that categories are written out to the XMP data in each image.

If I select say 10000 images in browser and update a category in all the images it takes about a minute to complete.

If I select the 10000 images in browser and update a category that only changes one image it still takes about 30 seconds to complete.

My understanding is that only one image changed and only one image file's XMP data would be updated which would be quite fast unless the software is doing something like reading each image file to see if it needs updating rather than just checking the catalogue to see if it needs updating.

What does the SW actually do with XMP data output enabled?

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 12:15 pm
by xnview
mkc73 wrote: Sat Aug 23, 2025 10:51 am If I select the 10000 images in browser and update a category that only changes one image it still takes about 30 seconds to complete.
if you update category it will be applied to all files

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 1:06 pm
by mkc73
Hi Pierre,

Thanks for your quick response.

Just to be clear : in the case where the category change only affects one file of the 10000 selected, all 10000 image files are updated ?

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 1:42 pm
by mkc73
So the 'change' flag is set for the entire selection and results in the entire selection being written out to XMP even if the change only actually affects one image.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 4:39 pm
by michel038
I think XnViewMP must read xmp data of each image before knowing if the update is necessary or not.
There is no guarantee that the catalog matches the photo data before running the operation.
This is precisely the way for the user to ensure that, after the operation, the catalog will be synchronized with the photos' XMP data.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Sat Aug 23, 2025 5:06 pm
by mkc73
That agrees with my observation of time taken for the operation - not nearly zero as expected, but about half of the time taken if all image files are changed.

I'm not sure I quite believe your rationale for this behaviour though. Either the image XMP data and the catalogue are in sync or they're not. SYncing some files randomly because they were selected is not going to help. I think you said previously that XnView provides functionality for ensuring files are in sync with catalogue.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Tue Aug 26, 2025 4:32 pm
by michel038
Sometimes, I change my keyword choices for sets of photos that I select. As mentioned in another thread, keywords previously used on some of the photos appear grayed out, while those that exist in all the photos in the selection have their checkbox checked. This allows me to view the indexing status, then check or uncheck keywords based on my new choices. At the end of this operation, I consider the synchronization of keywords and catalog to be complete.

There is no synchronization verification function in XnViewMP. For a set of selected photos, you can use the “Update catalog from files” or “Update files from catalog” functions, depending on the priority or reliability you assign to keywords or to the catalog.

If you want to process entire folders from files to catalog, you can use “Import folders” (settings, Catalog).

The opposite direction (catalog to files) seems more risky to me in case of errors or misunderstandings, so I prefer to use the method of “unchecking/checking” the category checkboxes (after enabling the export options in Settings Metadata) instead of using "update files from catalog" on thousands of photos.

Translated with DeepL.com (free version)

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Tue Aug 26, 2025 9:06 pm
by mkc73
Many thanks for your responses. I understand what you are saying.

My query about the time taken (on my system) to perform some minor changes to my categories has, I think,been answered by the statement that all images in the selection have been updated regardless of whether their keywords will change.

As per a previous discussion I implement a default ALL category to select all images in my database.

If there is a category DATE which has been set for 99% of the images I thought using ALL for the image selection and then ticking DATE (changing it from grey) would be an efficient way to set the DATE keyword in all images. But that is not the case because all images are written to.

Instead have to select images using ALL AND !DATE and then tick DATE, which only updates images that need updating.

I would argue that it would be nicer if XnView maintained a flag for each image in the image selection as to whether it needed updating and wrote out XMP data on that basis - this would work even if multiple categories like DATE were ticked which would be hard to do otherwise
i.e update ALL AND !(DATE1 OR DATE2 OR..)

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Tue Aug 26, 2025 11:59 pm
by jkm
mkc73 wrote: Tue Aug 26, 2025 9:06 pm As per a previous discussion I implement a default ALL category to select all images in my database.
Just as an aside, this is unnecessary. There is a pre-existing "All" item in the Catalog Filter panel that performs this function. It is located in the Special Items tree.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 7:53 am
by mkc73
I'm not sure that is the case? I believe ALL is just a way to display in the browser all images. Unfortunately I don''t think it can be used as part of a filter operation.

https://newsgroup.xnview.com/viewtopic.php?t=46855

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 8:32 am
by jkm
mkc73 wrote: Wed Aug 27, 2025 7:53 am I'm not sure that is the case? I believe ALL is just a way to display in the browser all images. Unfortunately I don''t think it can be used as part of a filter operation.

https://newsgroup.xnview.com/viewtopic.php?t=46855
Well you can click All, and then Alt-Click other categories to remove them. That definitely works. You cannot use it in a Ctrl-F search, if that's what you mean.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 8:38 am
by mkc73
That didn't use to work and still does not seem to work on my latest XnView 1.9.3. That is precisely what I was arguing for in the link I provided.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 8:52 am
by jkm
Well I just tried it in 1.9.3 on Windows before I posted. It seemed like it worked, but after further inspection, it seems only the GUI-control portion works, and that the actual filtering does not work.

I clicked on All, and it selected everything. Then I alt-clicked on a category. The Browser contents refreshed, the exclusion icon appeared on the category I alt-clicked, and it looked like it was searching (the progress bar at the bottom ran though). But when I checked, the count in the lower left corner did not change. There were the same number of files before the exclusion as after.

So this seemingly works but is actually broken, I think. It lets you go through the motions and looks like it's doing something, but does not actually do what you select.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 9:07 am
by mkc73
I believe it is working correctly and doing what it was intended to do - it's just not what would seem natural for it to do in terms of filtering categories. That would have to be added as a new feature such as the suggestion of adding a special ALL keyword to categories. Until then the best option is to add an ALL category oneself.

Re: Puzzled about what is going on internally when a category value is changed and changed data is written to XMP data.

Posted: Wed Aug 27, 2025 9:14 am
by jkm
If you believe that, can you explain what it is actually doing when it behaves as I describe above?

If All is not SUPPOSED to work with filtering, ok, I get it. It's not yet a feature. But if it's not a feature, it shouldn't let you alt-click and go through the charade. For example, if All is selected, it will not let me Alt-click a Color or a Rating. That would be appropriate behavior if it's not a feature.

But it DOES let you alt-click on specific categories, and looks like it's doing something; it just doesn't work. The behavior should be consistent. It is not.