Author Topic: Closed: Reviewing and caching issue  (Read 7376 times)

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Closed: Reviewing and caching issue
« on: May 07, 2011, 03:32:18 AM »
PhotoMechanic is really fast when reviewing your images, however, when reviewing the (pre) caching algorithms seem to favour a certain direction of walking through your images.

I frequently go quickly back and forth between two or more images to see the differences. This seems to throw off the caching. Especially when zoomed-in at 100% with large images, I frequently have to wait for the image to be rendered fully. This is quite irritating when you need to review subtle differences as instead of an instant overlay of the new image you first get a very coarse approximation, throwing away any means of really comparing the two.

The funny thing is when you walk through your images in one direction only, you do not suffer from this so it seems to me the caching algorithm throws away the "last" viewed images, but keeps the ones "ahead". Could this be changed so that the caching either remembers all or, if there are memory constraints, at least a number of  images "around" the current one?

(Note: this is easy to reproduce. Open a folder with a couple of really large files, preview the first one, zoom in at 100%, switch to the next, then go back, and forth, and back again. You'll see it needs to re-render the image unexpectedly)

Another thing I noticed is that sometimes it doesn't remember the correct rendering of an image either and I get a rendering that is close to the full quality but a bit more coarse. I hadn't noticed this before, but in this case I was reviewing a large (A0, 300ppi) image saved at three different jpg quality levels. The highest quality (70MB) one would sometimes show as the worst of the three. When this happened I did notice PM didn't try to re-render the image like it would have done before. Hope this last bit makes sense as this is hard to reproduce and describe. Maybe this problem will also go away if the caching algorithm is changed as I described above?

Thanks,
    Hayo
« Last Edit: May 07, 2019, 12:29:46 AM by Hayo Baan »
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Reviewing and caching issue
« Reply #1 on: May 07, 2011, 06:42:52 AM »
Hayo,

PhotoMechanic is really fast when reviewing your images, however, when reviewing the (pre) caching algorithms seem to favour a certain direction of walking through your images.

I frequently go quickly back and forth between two or more images to see the differences. This seems to throw off the caching. Especially when zoomed-in at 100% with large images, I frequently have to wait for the image to be rendered fully. This is quite irritating when you need to review subtle differences as instead of an instant overlay of the new image you first get a very coarse approximation, throwing away any means of really comparing the two.

The funny thing is when you walk through your images in one direction only, you do not suffer from this so it seems to me the caching algorithm throws away the "last" viewed images, but keeps the ones "ahead". Could this be changed so that the caching either remembers all or, if there are memory constraints, at least a number of  images "around" the current one?

(Note: this is easy to reproduce. Open a folder with a couple of really large files, preview the first one, zoom in at 100%, switch to the next, then go back, and forth, and back again. You'll see it needs to re-render the image unexpectedly)

Another thing I noticed is that sometimes it doesn't remember the correct rendering of an image either and I get a rendering that is close to the full quality but a bit more coarse. I hadn't noticed this before, but in this case I was reviewing a large (A0, 300ppi) image saved at three different jpg quality levels. The highest quality (70MB) one would sometimes show as the worst of the three. When this happened I did notice PM didn't try to re-render the image like it would have done before. Hope this last bit makes sense as this is hard to reproduce and describe. Maybe this problem will also go away if the caching algorithm is changed as I described above?

Try giving PM a larger Memory Cache size.  It is true that PM precaches solely in the direction that you're browsing.  But it is also true that PM will try to keep as many most recently used images in memory as it can (allowed by the Memory Cache size).  We could make it a preference that instead of four images in the direction you're browsing are the working set, that three in the direction you're browsing and one in the opposite direction is the working set.

As for the last issue, we'd have to see that one in action.

-Kirk

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Reviewing and caching issue
« Reply #2 on: May 07, 2011, 02:13:01 PM »
Try giving PM a larger Memory Cache size.  It is true that PM precaches solely in the direction that you're browsing.  But it is also true that PM will try to keep as many most recently used images in memory as it can (allowed by the Memory Cache size).  We could make it a preference that instead of four images in the direction you're browsing are the working set, that three in the direction you're browsing and one in the opposite direction is the working set.
Memory cache is already at its maximum of 1024MB (our Mac Pro has 14GB installed, plenty space available) so nothing to be gained there I'm afraid (hence my earlier request re extending this limit). I am talking really big images here (in this case > 9000 x 14000 pixels)…

For me (and I'm sure for others too) it would be great if you could have the "working set" be defined differently and have it include previous images as well. In this sense perhaps four images may be a bit on the small side too, perhaps this could be raised/configured as well?

As for the last issue, we'd have to see that one in action.
Problem is it is not fully reproducible.  I have only seen it twice now with the same set of images, but I couldn't reproduce it every time. Perhaps better forget about it for now; first issue is much more important for me anyway.

Thanks,
    Hayo
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Reviewing and caching issue
« Reply #3 on: May 07, 2011, 06:33:20 PM »
Hayo,

Try giving PM a larger Memory Cache size.  It is true that PM precaches solely in the direction that you're browsing.  But it is also true that PM will try to keep as many most recently used images in memory as it can (allowed by the Memory Cache size).  We could make it a preference that instead of four images in the direction you're browsing are the working set, that three in the direction you're browsing and one in the opposite direction is the working set.
Memory cache is already at its maximum of 1024MB (our Mac Pro has 14GB installed, plenty space available) so nothing to be gained there I'm afraid (hence my earlier request re extending this limit). I am talking really big images here (in this case > 9000 x 14000 pixels)…

For me (and I'm sure for others too) it would be great if you could have the "working set" be defined differently and have it include previous images as well. In this sense perhaps four images may be a bit on the small side too, perhaps this could be raised/configured as well?

We're not likely to make those kinds of changes until PM is a 64-bit app.  Your really large images are filling up the cache (even though you have it maximized) and since the image you last looked at isn't part of the working set and the other images in the direction you're browsing are, your last image gets purged.

The suggestion I made would solve this issue for the case where you're toggling back and forth, but forward caching would suffer the loss of one image.  But it would be up to you to choose the method you prefer.

-Kirk

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Reviewing and caching issue
« Reply #4 on: May 08, 2011, 12:54:22 AM »
We're not likely to make those kinds of changes until PM is a 64-bit app.  Your really large images are filling up the cache (even though you have it maximized) and since the image you last looked at isn't part of the working set and the other images in the direction you're browsing are, your last image gets purged.
Ok, understood.

The suggestion I made would solve this issue for the case where you're toggling back and forth, but forward caching would suffer the loss of one image.  But it would be up to you to choose the method you prefer.
I think I would be helped a lot already if I can configure it the way you proposed. Extending the set etc. can be implemented later, when the application becomes 64-bit.

Thanks,
    Hayo
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Reviewing and caching issue
« Reply #5 on: May 09, 2011, 05:18:56 PM »
Kirk,
I have a MB Pro with 4GB Memory and a 2.4GHz Intel Core 2 Duo Processor.
Considering this configuration, do you think I could set PM's memory cache size at 1024MB?
TIA

-Luiz Muzzi

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Reviewing and caching issue
« Reply #6 on: May 09, 2011, 05:52:18 PM »
Luiz,

I have a MB Pro with 4GB Memory and a 2.4GHz Intel Core 2 Duo Processor.
Considering this configuration, do you think I could set PM's memory cache size at 1024MB?

No.  I'd set it somewhere around 368 MB to 512 MB on your system.

-Kirk

Offline Luiz Muzzi

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • Luiz Muzzi Photography
Re: Reviewing and caching issue
« Reply #7 on: May 12, 2011, 04:18:39 AM »
Kirk,
Thanks for your quick reply.
Regards,

-Luiz Muzzi