Photoshop CC 2014: Long wait while histograms build (GuideGuide update)

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
  • (Edited)
I usually have the photographers sitting next to me when I work.
Since Photoshop CC2014 I feel embarrassed and less than Professional having the photographer next to me as we wait 20 to 30 seconds every time I touch another open Photoshop window on the desktop. Photoshop CC did not do this.

The Situation
Since Photoshop CC2014 a histogram rebuild is automatically invoked every time my mouse clicks on another open PS image window. I routinely work with large image files for large scale exhibition prints and have a few smaller reference images open...

1- The histogram rebuilds for the large images I work with takes 20 ~ 30 seconds
(Images up to ~ 6GB)

2- Clicking the 'cancel' button in the "Building Histograms" window, I have learned, is a high risk thing to do. I have had Photoshop CC2014 crash on me far too many times by clicking "cancel" to use it anymore. I'd rather endure the wait, than risk loosing all my changes in my large open Photoshop file.

3- There is no options or preference to disable this automatic histogram re-building.

4- CC2014 will rebuild the image histogram even if there have been no adjustments made to the image since the previous histogram re-build.

Requests
Please stop me having to wait... CC didn't make me wait.
- build the histograms in background...
- a preference "Auto Rebuild Histograms" that a user can turn off.
- an "optimize Photoshop for large images" button / check box
Or something... and
- only build a histogram if it's needed.( has the image changed since the last rebuild?)

Note: I run a MacPro 2.4Ghz Quad core, 32GB ram, 2x PCIe SSDs. one for the OS and the other for Photoshop scratch
The histogram rebuild saturates the CPU cores for the duration of the histogram build. Under Photoshop CC the MacPro was a more than adequate performer.

Regards
Peter Miles
Photo of peter Miles

peter Miles

  • 11 Posts
  • 1 Reply Like

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 768 Reply Likes
I haven't heard of anyone else seeing that behavior.

But it does sound a lot like a bug we saw in a third party plugin a while back -- it was asking for histogram updates all the time. Looks like it was the GridIron Flow plugin "ActiveDoc Monitor.8li", and a similar bug in "RadLab". https://forums.adobe.com/thread/72634...

Oh, and if the histogram palette is open, having cache/pyramid levels set to 1 would really slow it down.
Photo of peter Miles

peter Miles

  • 11 Posts
  • 1 Reply Like
Hi Chis.
A very big thank you for that!
The calls to rebuild the histograms stopped once I disable the 3rd party extension/plugin "GudeGuide".

regards
Peter Miles
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Could you post your Help -> System Info log, so we can see what other plugins and panels you have installed? (that can help us and Cameron identify possible conflicts)
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Alright, looks like we won't need that since Cameron has found (at least part of) the problem.
Photo of Cameron McEfee

Cameron McEfee

  • 5 Posts
  • 6 Reply Likes
Hello!

I'm the author of GuideGuide. GuideGuide doesn't make calls to the histograms at any point.

It sounds like the issue happens when switching documents. GuideGuide has an listener for 'documentAfterActivate' which calls this code: https://gist.github.com/cameronmcefee...

It also has a listener for 'documentAfterDeactivate', however that handler makes no API calls.

The gist of the code is that it's getting document dimensions and ruler units. Do you see anything there that might be triggering the histogram issue?

Cameron
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
You may have an unintended side effect from some scripting command you do which forces a base level (pyramid level 0) update of the histogram (which can be slow).

Try creating a huge document (like 8 gig or more), add some noise (so it isn't a solid color and avoids optimizations made for solid colors), then see if a histogram progress bars show up while using your panel.
Photo of Cameron McEfee

Cameron McEfee

  • 5 Posts
  • 6 Reply Likes
Thanks Chris, I'm able to reproduce. I'll dig in and see if I can figure out the source.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Ah, good. Debugging non-reproducible bugs isn't nearly as much fun.
Photo of Tom Ruark

Tom Ruark, Official Rep

  • 26 Posts
  • 11 Reply Likes
Make sure when you are asking for Photoshop information you are not asking for all of the keys, not having a putPropety call will do this.

Make sure you are asking for one and only one key. Do that as many times as you like but it avoids the "give me all the keys" which would include the histogram information.

This for example gets the text layer information. If you remove the putProperty call it will still give you the textKey information but it will also give you all the keys. You can check desc.count to see this if you comment out the putProperty call below.

var ktextKeyStr = stringIDToTypeID("textKey");
var ref = new ActionReference();
ref.putProperty(charIDToTypeID('Prpr'), ktextKeyStr);
ref.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'),
charIDToTypeID('Trgt'));
var desc = executeActionGet(ref);

if ( desc.hasKey( ktextKeyStr ) ) {

For you it would be using charIDtoKeyID('Wdth') and charIDToTYpeID('Hght').
Photo of Photoshop FAQ

Photoshop FAQ, Official Rep

  • 162 Posts
  • 6 Reply Likes
Thanks Tom - You da man.
Photo of Cameron McEfee

Cameron McEfee

  • 5 Posts
  • 6 Reply Likes
Awesome, thanks Tom! I just tracked down the cause and was about to ask how I might fix things. That looks like it'll do the trick.

Related, is there a good canonical source for the IDs? I don't know a *whole lot* about how the ActionReference (not sure what to call this type of code) stuff works, so I still find myself fumbling for solutions in this area.
Photo of Cameron McEfee

Cameron McEfee

  • 5 Posts
  • 6 Reply Likes
Just to follow up, I've implemented Tom's solution and it appears to fix the issue. I'll push a new release in the next day or so. My wife just had a baby so I'm a little slow at the moment.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
The delay is perfectly understandable... (don't want to break anything, or wake other little things)

Also, you're far from alone in fetching too much data from scripts.
(Tom and I were just discussing our internal scripting mistakes :-)
Photo of Photoshop FAQ

Photoshop FAQ, Official Rep

  • 162 Posts
  • 6 Reply Likes
Dude! Congratulations - have fun with the new little one!
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13944 Posts
  • 1657 Reply Likes
^ That was from me - BTW.
Photo of peter Miles

peter Miles

  • 11 Posts
  • 1 Reply Like
Hi Cameron.
looking forward to getting guideguide back into photoshop. Thanks for all the work you do to keep this very useful tool running at it's best.
Photo of Cameron McEfee

Cameron McEfee

  • 5 Posts
  • 6 Reply Likes
Update: I release v3.1.3 today which resolves this issue. You can grab it here: http://guideguide.me/