Author Topic: Inconsistent preview performance on next/prev browsing  (Read 5083 times)

Offline joema

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Inconsistent preview performance on next/prev browsing
« on: March 26, 2012, 12:44:12 PM »
PM 4.6.8: when browsing through 5760x3840 pixel .jpg files (about 5MB each) via the preview viewer, the screen periodically goes grey for several seconds before the image is rendered. I'm not holding down the right arrow key -- just tapping the right arrow repetitively to briskly step through photos. It feels like the "next photo" UI events are outrunning the program's ability to render the image, and it just shows a grey screen until it catches up.  My PC is fairly powerful, and not running anything else. Is this performance normal?

Cache is on a 10,000 RPM SATA drive, photos are on a RAID 0 array. I tried the disk and memory cache at defaults then increased disk to 1024 MB, and memory to 512 MB, with no difference seen.

Windows 7 Home Edition SP1 64-bit
Motherboard: EVGA P55 FTW (A72 BIOS)
CPU: quad-core Intel i7-860 @ 3.8Ghz, hyperthreading on, RAM: 8GB DDR3
System disk: 300GB Velociraptor, 10k rpm SATA
Data disk: 2 x 1.5TB Barracuda, 7200 rpm SATA, RAID 0
Video: EVGA nVidia GeForce GTX-275 896MB, driver: 8.17.12.9053 (290.53)
Browser: Chrome 17.0.963.83 m, FireFox 11.0.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Inconsistent preview performance on next/prev browsing
« Reply #1 on: March 26, 2012, 01:30:38 PM »
PM 4.6.8: when browsing through 5760x3840 pixel .jpg files (about 5MB each) via the preview viewer, the screen periodically goes grey for several seconds before the image is rendered. I'm not holding down the right arrow key -- just tapping the right arrow repetitively to briskly step through photos. It feels like the "next photo" UI events are outrunning the program's ability to render the image, and it just shows a grey screen until it catches up.  My PC is fairly powerful, and not running anything else. Is this performance normal?

How quickly are you pressing the right arrow key?  If it is more than four to six times a second, then the caching system isn't going to be able to keep up.

-Kirk

Offline joema

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Inconsistent preview performance on next/prev browsing
« Reply #2 on: March 26, 2012, 02:54:34 PM »
I just noticed it doesn't happen no matter how rapidly I browse photos, if I make no zoom changes -- just take the default zoom preview zoom level. That's 24% for the 1st photo and it changes to 29% for all subsequent photos (I don't know why). I can just hold down the right arrow, let it auto-repeat at the max rate and the photos blitz by. Some are partially rendered and have aliasing but that's expected.

If I zoom to any magnification, then return to the initial 25% (I can't select 24%), the problem then happens. Even manually advancing at about 3 photos per second, the screen periodically goes entirely grey.

It's apparently using some optimization at the default zoom level which doesn't resume even if zoom level is manually returned to 25%. Once it occurs, it still happens after exiting and re-entering preview. I have to restart the application to restore the fast preview performance.
« Last Edit: March 26, 2012, 02:56:22 PM by joema »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Inconsistent preview performance on next/prev browsing
« Reply #3 on: March 26, 2012, 10:13:18 PM »
I just noticed it doesn't happen no matter how rapidly I browse photos, if I make no zoom changes -- just take the default zoom preview zoom level. That's 24% for the 1st photo and it changes to 29% for all subsequent photos (I don't know why). I can just hold down the right arrow, let it auto-repeat at the max rate and the photos blitz by. Some are partially rendered and have aliasing but that's expected.

If I zoom to any magnification, then return to the initial 25% (I can't select 24%), the problem then happens. Even manually advancing at about 3 photos per second, the screen periodically goes entirely grey.

It's apparently using some optimization at the default zoom level which doesn't resume even if zoom level is manually returned to 25%. Once it occurs, it still happens after exiting and re-entering preview. I have to restart the application to restore the fast preview performance.

Instead of changing the zoom level down to 25%, try just turning it off and see if that makes a difference.  If you just want to pop in and out of zoom on a particular feature, hold down the Control key and click on the area you wish to see.  Control-click again to pop back out of zoom mode.

Please see if that helps.

-Kirk

Offline joema

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Inconsistent preview performance on next/prev browsing
« Reply #4 on: March 27, 2012, 06:11:34 AM »
At the photo size I'm using (5760 x 3840) jpg, the default preview magnification is 29%. Browsing next/prev is pretty fast. If I change to anything else -- even 25% which is similar -- browsing is a lot slower and I see the grey screen a lot. Changing back to 29% via CTRL-click restores some -- but NOT ALL -- of the performance. IOW if you EVER zoom, then browsing performance stays degraded until restarting the program, even if you undo the zoom. This implies a persistently different internal program or cache state.
« Last Edit: March 27, 2012, 06:13:05 AM by joema »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Inconsistent preview performance on next/prev browsing
« Reply #5 on: March 27, 2012, 06:28:12 AM »
At the photo size I'm using (5760 x 3840) jpg, the default preview magnification is 29%. Browsing next/prev is pretty fast. If I change to anything else -- even 25% which is similar -- browsing is a lot slower and I see the grey screen a lot. Changing back to 29% via CTRL-click restores some -- but NOT ALL -- of the performance. IOW if you EVER zoom, then browsing performance stays degraded until restarting the program, even if you undo the zoom. This implies a persistently different internal program or cache state.

We'll look into it and see if we can reproduce the issue.

-Kirk

Offline Brandon

  • Member
  • **
  • Posts: 85
    • View Profile
Re: Inconsistent preview performance on next/prev browsing
« Reply #6 on: March 27, 2012, 11:07:25 AM »
Good day!

Thought I would comment on my test of this:
 
Photo Mechanic 4.6.8 on this Snow Leopard iMac does render slower with zoom enabled, but when I hit Z to disable the zoom it goes back to normal swift browsing.
[Core i5 \ 12GB RAM]

I was using 512 copies of a 5760x3840 JPG taken by a Canon 5D Mark III

I will test on other systems to try and reproduce the "IOW if you EVER zoom, then browsing performance stays degraded until restarting the program, even if you undo the zoom. "

-Brandon

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Inconsistent preview performance on next/prev browsing
« Reply #7 on: March 28, 2012, 02:05:03 PM »
At the photo size I'm using (5760 x 3840) jpg, the default preview magnification is 29%. Browsing next/prev is pretty fast. If I change to anything else -- even 25% which is similar -- browsing is a lot slower and I see the grey screen a lot. Changing back to 29% via CTRL-click restores some -- but NOT ALL -- of the performance. IOW if you EVER zoom, then browsing performance stays degraded until restarting the program, even if you undo the zoom. This implies a persistently different internal program or cache state.

I just checked the code on the Windows version.  If you are at any Zoom level (the Zoom checkbox is set to checked) then full size images are being loaded and the scaling happens during the draw to the window.  If you un-check the Zoom checkbox then you are in a stretch-to-fit view (which will vary according to the width/height of the image and preview pane size) but this mode can take advantage of a feature in JPEG decoding which allows much of the JPEG data to be ignored when you aren't viewing the full image.  In your case with 24%-29% of the image resolution being used, only half of the JPEG data is being decoded and the last bit of resizing is due to image scaling.

Stretch-to-fit mode is definitely faster and should always be faster, regardless if you ever used the Zoom feature.  But you're saying it isn't fast after Zoom use and I have no reason to doubt you.

Can you list the smallest number of steps that, if followed, will produce the performance decrease?  Please list your Caching settings as well.

Thanks,

-Kirk

Offline joema

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Inconsistent preview performance on next/prev browsing
« Reply #8 on: March 29, 2012, 07:03:28 AM »
...Stretch-to-fit mode is definitely faster and should always be faster, regardless if you ever used the Zoom feature.  But you're saying it isn't fast after Zoom use and I have no reason to doubt you.

Can you list the smallest number of steps that, if followed, will produce the performance decrease?  Please list your Caching settings as well.

OK I did further testing and it's consistent -- once zoomed the browsing performance stays slightly degraded even after removing zoom, and stays this way until app restart.  However the magnitude of slowdown is small; I have to press/hold right arrow in auto-repeat for many photos to see the grey screen.

Replication sequence:

(1) Start PM 4.6.8
(2) Open folder of 22 megapixel jpg images (5760x3840), about 4.7MB each
(3) Double-click on image to open Preview
(4) Press & hold right arrow key. Note it's very fast and never encounters the "grey screen". Try left arrow also.
(5) Select any zoom level via CTRL +
(6) Press & hold right arrow key. Note the grey screen which quickly happens
(7) Undo zoom by pressing Z key.
(8 ) Press & hold right arrow key. Note the grey screen still happens even without zoom, but less frequently than zoomed.


Image location: e: (2-drive RAID 0 array, 2.8TB, 2x 7200 rpm Seagate Barracuda SATA, about 50% full)

Cache settings:
Location: c: (300MB 10,000 rpm Seagate Velociraptor, about 50% full)
Disk cache size: 1024MB
Reserve at least 100 MB on disk for cache volume
Empty cache on exit: not selected
Remove cache files that are older than 5 days: not selected
Memory cache: 512MB


Windows 7 Home Edition SP1 64-bit
Motherboard: EVGA P55 FTW (A72 BIOS)
CPU: quad-core Intel i7-860 @ 3.8Ghz, hyperthreading on, RAM: 8GB DDR3
System disk: 300GB Velociraptor, 10k rpm SATA
Data disk: 2 x 1.5TB Barracuda, 7200 rpm SATA, RAID 0
Video: EVGA nVidia GeForce GTX-275 896MB, driver: 8.17.12.9053 (290.53)
Browser: Chrome 17.0.963.83 m, FireFox 11.0.