Author Topic: speed of preview generation  (Read 1396 times)

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
speed of preview generation
« on: October 29, 2023, 03:07:16 AM »
2012 Mac Pro 10.14.6

Yesterday I began a 'scan to catalog' of about 180,000 Nikon .NEF files. After the metadata gathering I could see the preview generation running at about 6 batches/second. At the end of the day about half of the previews had been made & I shut down the Mac for the night.

When I started it up this morning the preview generation was running at about 1 batch/second. I quit & restarted PM+ but that made no difference. Activity monitor shows 3 pm-task entries, one at 400-500% cpu.

What determines the rate of preview generation & why would it be so much slower today than yesterday? There's nothing much else running.

David Hoffman

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 791
    • View Profile
Re: speed of preview generation
« Reply #1 on: October 31, 2023, 03:33:48 PM »
The speed of the disk where the proxies are being stored is generally the primary factor in how long it takes to do the process. You can send us your log file if you think there was an issue with it that you'd like us to look into.

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #2 on: November 01, 2023, 03:28:53 AM »
Quote
The speed of the disk where the proxies are being stored is generally the primary factor in how long it takes to do the process. You can send us your log file if you think there was an issue with it that you'd like us to look into.

The first preview generation, running at about 6 batches/second, was on the same drive & connected to the same port as the second preview generation running at about 1 batch/second. The other conditions were also much the same so this seems unlikely to have been related to the drive itself. Disk First Aid gives the drive a clean bill of health.

The reason that I was running this  'scan to catalog' of about 180,000 Nikon .NEF files (from an external drive) is that I was finding sort operations involving .NEF files on an internal 6TB WD drive were running slowly or (mostly) failing to complete. I wanted to eliminate the drive as the cause so took a backup of that drive and scanned it into a different (test) catalog. That’s when the preview generation speed anomaly appeared but that now seems to be just one aspect of a wider problem.

Once the backup .NEFs had been scanned into the test catalog I repeated some of the sort operations that had failed & they failed in the same way with this new setup (different catalog, different drive). The problem only occurs with .NEF files & with the numbered sort items shown in the dropdown. Filename, mod date and the others in the top part of the menu are fine. I assume that the data for those is readily accessible but that the other sort modes need to read the data from file. The .NEF data is a sidecar .xmp but all the other image formats have the data embedded so perhaps it’s reading the .xmp files that is problematic. My .DNG files have embedded metadata & they, like .TIF, .JPG, .PSD etc all sort quickly.

I tried to attach a couple of recent logs but I get an error that your upload folder is full! I'll try again later.

Let me know if there are any specific tests that might help clarify this problem.

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: speed of preview generation
« Reply #3 on: November 01, 2023, 09:11:41 AM »
David,

Once the backup .NEFs had been scanned into the test catalog I repeated some of the sort operations that had failed & they failed in the same way with this new setup (different catalog, different drive). The problem only occurs with .NEF files & with the numbered sort items shown in the dropdown. Filename, mod date and the others in the top part of the menu are fine. I assume that the data for those is readily accessible but that the other sort modes need to read the data from file. The .NEF data is a sidecar .xmp but all the other image formats have the data embedded so perhaps it’s reading the .xmp files that is problematic. My .DNG files have embedded metadata & they, like .TIF, .JPG, .PSD etc all sort quickly.

Custom sorts (the ones with numbers) all require sorting in the contact sheet itself and are not accelerated by the catalog database.  This requires fully loading all of the metadata from the images and XMP sidecar files before the sort can begin.  Once obtained, the sort should finish quickly.  The speed of the media where the files are stored is the limiting factor here.

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #4 on: November 02, 2023, 02:31:05 AM »
Quote
Custom sorts (the ones with numbers) all require sorting in the contact sheet itself and are not accelerated by the catalog database.  This requires fully loading all of the metadata from the images and XMP sidecar files before the sort can begin.  Once obtained, the sort should finish quickly.  The speed of the media where the files are stored is the limiting factor here.

I could have been more precise. As you write, the actual sort does finish quickly. It’s the preceding gathering of metadata where the problem arises.

When I sort files on that same drive that are not .NEF files the gathering of metadata runs fairly quickly & the sort completes. It's only when the sort involves both large numbers & they are .NEFs that the process fails.

I made a collection of 5,000 .NEFs on that drive & tried various sorts. All ran quickly. I increased the collection to 20,000 & it was still quick. I increased it again to 60,000. Sorts for filename, mod date etc all ran quickly but a sort by filesize started normally preloading metadata but after 4 minutes, at 60% it was clearly slowing. After another 2 minutes it had reached 80% but then it stuck. The notification showing % progress in the middle of the contact sheet disappeared & the progress bar at the bottom right stopped moving. After 30 minutes there had been no change. I selected sort by filename & PM+ responded instantly. From previous tests I think that if I had I left it longer PM+ would have stopped responding.

It appears that PM+ reads embedded metadata quickly but when reading from an .xmp, it takes a progressively longer time to do so as the numbers increase. As a result, with large numbers to read, the process fails. Is there a timeout or a limit to the amount of data that can be held during a sort?

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: speed of preview generation
« Reply #5 on: November 02, 2023, 10:39:01 AM »
David,

Quote
Custom sorts (the ones with numbers) all require sorting in the contact sheet itself and are not accelerated by the catalog database.  This requires fully loading all of the metadata from the images and XMP sidecar files before the sort can begin.  Once obtained, the sort should finish quickly.  The speed of the media where the files are stored is the limiting factor here.

I made a collection of 5,000 .NEFs on that drive & tried various sorts. All ran quickly. I increased the collection to 20,000 & it was still quick. I increased it again to 60,000. Sorts for filename, mod date etc all ran quickly but a sort by filesize started normally preloading metadata but after 4 minutes, at 60% it was clearly slowing. After another 2 minutes it had reached 80% but then it stuck. The notification showing % progress in the middle of the contact sheet disappeared & the progress bar at the bottom right stopped moving. After 30 minutes there had been no change. I selected sort by filename & PM+ responded instantly. From previous tests I think that if I had I left it longer PM+ would have stopped responding.

It appears that PM+ reads embedded metadata quickly but when reading from an .xmp, it takes a progressively longer time to do so as the numbers increase. As a result, with large numbers to read, the process fails. Is there a timeout or a limit to the amount of data that can be held during a sort?

This failure to load metadata is an issue that has been unsolved for some time now.  So far we have been unable to fix it but it is a concern for us.  Generally, when it slows down, you can cancel the preload, wait a few seconds and try again and it will resume with full speed and then the operation will complete.

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #6 on: November 03, 2023, 11:40:51 AM »
Quote
Generally, when it slows down, you can cancel the preload, wait a few seconds and try again and it will resume with full speed and then the operation will complete.

That does happen with some other operations that that are preceded by metadata gathering although needing many attempts when large numbers of files are involved. I managed to get a file size sort to work on the 60,000 .NEF set once after 6 or so attempts but not since. The full set has never got past 45%.

Quote
This failure to load metadata is an issue that has been unsolved for some time now.  So far we have been unable to fix it but it is a concern for us. 

There's a feature request from last summer for a 'known issues' page. Had that been implemented it would have saved me many hours trying to fix the problem at my end. Perhaps that might now be possible?

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: speed of preview generation
« Reply #7 on: November 03, 2023, 11:56:27 AM »
David,

There's a feature request from last summer for a 'known issues' page. Had that been implemented it would have saved me many hours trying to fix the problem at my end. Perhaps that might now be possible?

Can you please provide a link to the post?

Thanks,

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #8 on: November 04, 2023, 06:22:27 AM »
Quote
Can you please provide a link to the post?

It's in the PM feature request list, not the PM+ one but it's equally applicable.
https://forums.camerabits.com/index.php?topic=15182.0

David

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #9 on: November 10, 2023, 12:35:56 AM »
Hi Kirk

There's a post today 'colour rendering in slide show' that also shows how useful a 'known issues' page would be, perhaps with a pinned link in this forum. FritzImages (the post author) has spent valuable time trying to sort a problem that wasn't fixable - as did I & probably many other users. The same with the failure to load metadata unsolved issue that I spent hours pointlessly trying to fix on my setup.

If there was a page where these issues were listed it would demonstrate Camera Bits' respect for its users' time as well as help to build trust & loyalty.

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: speed of preview generation
« Reply #10 on: November 10, 2023, 10:51:39 AM »
David,

There's a post today 'colour rendering in slide show' that also shows how useful a 'known issues' page would be, perhaps with a pinned link in this forum. FritzImages (the post author) has spent valuable time trying to sort a problem that wasn't fixable - as did I & probably many other users. The same with the failure to load metadata unsolved issue that I spent hours pointlessly trying to fix on my setup.

If there was a page where these issues were listed it would demonstrate Camera Bits' respect for its users' time as well as help to build trust & loyalty.

I'm not sure we're willing to list every bug we know of publicly.  Some of them are very insignificant and only happen in very rare instances.

Instead, how about you create a thread (I'll pin it so it stays at the top) and the community can manage the list of bugs that are affecting them.

How does that sound?

-Kirk

Offline Odd Skjaeveland

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: speed of preview generation
« Reply #11 on: November 10, 2023, 11:10:23 PM »
...create a thread ... and the community can manage the list of bugs that are affecting them.

Sounds messy to me.
--
Odd S.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: speed of preview generation
« Reply #12 on: November 12, 2023, 08:00:49 PM »
...create a thread ... and the community can manage the list of bugs that are affecting them.

Sounds messy to me.

What do you suggest instead?

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: speed of preview generation
« Reply #13 on: November 13, 2023, 05:50:56 AM »
As Odd Skjaeveland says, I can't see how it wouldn't turn into a long messy string of posts and rapidly become unusable.

Kirk:
Quote
What do you suggest instead?

There are very many examples online. These are the first ones that came up in a Google search but there are sure to be other, more appropriate, implementations that could be adapted to suit.

https://support.google.com/chromeosflex/answer/11541806?hl=en
https://www.amazongames.com/en-us/support/new-world/articles/known-issues
https://learn.microsoft.com/en-us/windows/release-health/status-windows-11-21h2

David

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 791
    • View Profile
Re: speed of preview generation
« Reply #14 on: November 21, 2023, 03:00:16 PM »
As Odd Skjaeveland says, I can't see how it wouldn't turn into a long messy string of posts and rapidly become unusable.

Kirk:
Quote
What do you suggest instead?

There are very many examples online. These are the first ones that came up in a Google search but there are sure to be other, more appropriate, implementations that could be adapted to suit.

https://support.google.com/chromeosflex/answer/11541806?hl=en
https://www.amazongames.com/en-us/support/new-world/articles/known-issues
https://learn.microsoft.com/en-us/windows/release-health/status-windows-11-21h2

David

I've created a known issues page: https://docs.camerabits.com/support/solutions/articles/48001248753
I've tried to add issues have been reported to the support team frequently. Hopefully folks will find this useful.