16 Replies Latest reply: Feb 23, 2011 3:07 AM by Noel Carboni RSS

    Greatly reduced action performance in CS5

    n8turepix Community Member

      The bug issue text below wouldn't fit in the bug report form even though it's less than 2000 characters (another bug, perhaps?)

       

      ******BUG******

      Concise problem statement:  reduced performance in Action processing in CS5 compared to CS3

      Steps to reproduce bug:

      1. Create an image file, 8000 by 9880 pixels 16-bit RGB color.

      2. The background can be any image, though I was using a scan of a test target with colored patches for scanner calibration.

      3.  Create a layer "final target" on top of the background.  Set contents to transparent.

      4.  Create a selection 295 pixels on a side with rectangular marquee tool.  Position this selection in the upper left corner.

      5.  Save the selection to an alpha channel "Grid Box."

       

      6.  Run an action with the following steps.

      a.  Load the selection "Grid Box."

      b.  Select the layer "final target"

      c.  Expand the selection 2 pixels.

      d.  Fill the selection with the foreground color.

      e.  Set the foreground color to white.

      f.  Select the background layer.

      g.  Move the selection 295 pixels to the right.

      h.  Save the new selection as "Grid Box", replacing the channel.

       

      The use of this action:

       

      Use the eyedropper tool to select a color from the center of the selected square, then use the magic wand tool to subtract from the selection using the color in the center of the square in contiguous mode with tolerance set to 8.  Then run the action, and repeat the above process in the next selected square.  In the scan I am preparing, there is a grid of colored squares surrounded by a large black border.  The final result needs the black border eliminated so that the colored squares completely butt up against each other spaced 295 pixels apart.

       

      So by running the action, the color in the center of each box is copied to fill the rest of the square selected area that's black, leaving the center portion intact.   The copied colors go on the "final target" layer so the background layer is not disturbed.

       

      If you need a copy of the action and/or the image file, contact me by email.

       

      Results:  In CS5 the action is unusable due to the long run time.

      Expected results:  In CS3 it works perfectly.

        • 1. Re: Greatly reduced action performance in CS5
          Chris Cox Adobe Employee

          Have you installed all the updates for Photoshop CS5?

          Have you tried disabling your third party plugins?

          Have you tried disabling OpenGL drawing?

          Have you tried resetting Photoshop's preferences?

          • 2. Re: Greatly reduced action performance in CS5
            Noel Carboni Community Member

            Doesn't sound like you're doing anything that should be inherently slower, though that would be a fairly large image for a 32 bit system.  What is the RAM situation on your computer and in Photoshop preferences, and what operating system are you running?

             

            The one thing you mention in the step description that seems a little amiss is that  you're expanding the selection each time you run the action.

             

            As a fellow Photoshop user, I'll be happy to test your action comparitively on my CS5 and CS3 installs, but I'd rather not take the time to try to reproduce the action from the steps you've given in text.  Why not post it online and provide a link here?

             

            -Noel

            • 3. Re: Greatly reduced action performance in CS5
              n8turepix Community Member

              My OS is Windows XP Pro, SP3.  4GB RAM installed.  CS5 version is 12.0.3.  No third-party plugins are installed, and I disabled OpenGL with no effect.

               

              My written description left out the fact that I re-saved the selection after moving it so it was not expanded repeatedly.  I also tried using a path instead of a selection in an alpha channel but this did not improve the performance either.  The upload action uses the path.  If you're testing it, create a 295x295 pixel selection and save it as the path "Grid Box."

               

              Download the action from:

              http://cid-d67ed7f4277ed70c.office.live.com/embedicon.aspx/.Public/Target%20Actions.atn

               

              It might be cryptic just what I'm trying to do.  The application is to calibrate a film scanner, and to do this one scans a test film with colored squares.  Unfortunately due to the scanner optics only the center part of each color patch is usable, so it was necessary to mask off the outer portions of each square with a piece of dark plastic and then reconstruct an image that looks like the original test film where the outer portions of each square are the average color of the square's center.  When I'm running the action I sample the center part of a square with the eyedropper tool, then use the magic wand tool to subtract the center part of the color patch from the selection to create a new selection that looks like a square ring that the action fills with the foreground color.  Then it steps one square to the right and the process repeats for the next color patch.

               

              The file is large, but if it is a system configuration issue it seems strange that CS3 can handle this yet CS5 cannot when it's marketed as having improved attention to performance.

              • 4. Re: Greatly reduced action performance in CS5
                Chris Cox Adobe Employee

                It is also strange that you see a slowdown where other users don't.

                And until we figure out what is different about your setup, or what you are doing - we won't know why you are seeing the slowdown.

                • 5. Re: Greatly reduced action performance in CS5
                  Chris Cox Adobe Employee

                  I setup a document as you specified, and ran your action: and it takes less than half a second each time I run it.

                  • 6. Re: Greatly reduced action performance in CS5
                    Noel Carboni Community Member

                    My theory initially was that you had given Photoshop just enough RAM to work efficiently with your CS3 setup, but perhaps because of differences in your Photoshop RAM setting or perhaps because Photoshop CS5 has more code in memory, it's starving for RAM under the same test, and goes to its scratch file for relief.

                     

                    I created a test image and tried your action with a stopwatch.

                     

                    • Photoshop CS5 x64 on Windows 7 x64 (i.e., with plenty of RAM) takes 1.8 seconds to run through your action.

                     

                    • Photoshop CS5 32 bit consistently takes 6.8 seconds to go through the same steps.   Notably it stalls on the Expand and Select layer "Background" steps for a few seconds each, where it blazed right through them in the 64 bit version.

                     

                    In my case I have given Photoshop CS5 2897 MB to work with (89%).  This number is larger on a 64 bit system than what you can set because Photoshop 32 bit can use up to a 3 GB address space.

                     

                    I'll do tests next with earlier versions of Photoshop.

                     

                    -Noel

                    • 7. Re: Greatly reduced action performance in CS5
                      Noel Carboni Community Member
                      • Photoshop CS4 x64 takes 1.0 seconds to go through the action.

                       

                      • Photoshop CS4 32 bit takes 1.4 seconds to go through the action.

                       

                      -Noel

                      • 8. Re: Greatly reduced action performance in CS5
                        Noel Carboni Community Member
                        • Photoshop CS3 takes conservatively 0.8 seconds to run through the action.  My stopwatch is only good to 0.2 second, and sometimes I got 0.6 seconds for a reading.

                         

                        That's a 10x performance degradation with Photoshop CS5 32 bit over Photoshop CS3 confirmed.

                         

                        -Noel

                        • 9. Re: Greatly reduced action performance in CS5
                          Noel Carboni Community Member
                          function(){return A.apply(null,[this].concat($A(arguments)))}

                          Noel Carboni wrote:


                          Photoshop CS5 32 bit consistently takes 6.8 seconds to go through the same steps.   Notably it stalls on the Expand and Select layer "Background" steps for a few seconds each, where it blazed right through them in the 64 bit version.

                           

                          I'll clarify this a bit...

                           

                          When the Action step Expand is highlighted and the action is stalled for a few seconds, the History menu is actually showing Fill.  When the Action step Select layer "Background" is highlighted for a few seconds, the History step is still showing Deselect.

                           

                          Chris, did you test with both 32 and 64 bit Photoshop CS5?  There's definitely something going on here with 32 bit CS5.  I see it write a large amount of data to its scratch file, by the way.

                           

                          -Noel

                          • 10. Re: Greatly reduced action performance in CS5
                            Chris Cox Adobe Employee

                            Off work today, so I don't have all my machines handy for testing.

                            We'll have to take a look when I get back in the office (or one of our QE reads this).

                            • 11. Re: Greatly reduced action performance in CS5
                              n8turepix Community Member

                              Thanks, Noel for confirming my suspicion.  I only have CS3 and CS5 32-bit and have gone back to CS3 for this project until I have a resolution.

                               

                              -Chris.

                              • 12. Re: Greatly reduced action performance in CS5
                                Noel Carboni Community Member

                                Chris (n8turepix), have you tried increasing the memory space given to Photoshop CS5 in Edit - Preferences - Performance?

                                 

                                -Noel

                                • 13. Re: Greatly reduced action performance in CS5
                                  MTSTUNER Community Member

                                  Does the action stall when running using the play button in the actions panel

                                  or stall when using the F10 shotcut key?

                                   

                                  For me using cs5 32 bit, the action runs fine using the action panel play button,

                                  but stalls using the F10 shortcut. If i change the shortcut to F6, then the action runs

                                  fine either way.

                                   

                                  Anyway, just a thought.

                                   

                                   

                                   

                                   

                                  MTSTUNER

                                  • 14. Re: Greatly reduced action performance in CS5
                                    n8turepix Community Member

                                    Good catch.  There is no delay using the Play arrow button, but F10 stalls.  I can't find anything about F10 being already assigned and the Action code allows me to assign it.  Somehow, it's an evil shortcut key.  Windows documentation says F10 "activates the menu bar in the active program."  So it could be that it's hooked by the OS and should therefore not be allowed in Photoshop, or PS isn't hooking the key properly to prevent Windows from trapping it.

                                     

                                    More to the point:  Code in CS5 is dealing with the keypress differently from the way CS3 did it.

                                    • 15. Re: Greatly reduced action performance in CS5
                                      MTSTUNER Community Member

                                      I really don't know the cause, but i've seen this on several different versions

                                      of windows and photoshop cs5.

                                       

                                      I just don't use the F10 shortcut, in cs5 anyway.

                                       

                                       

                                       

                                      MTSTUNER

                                      • 16. Re: Greatly reduced action performance in CS5
                                        Noel Carboni Community Member

                                        FYI, I'm seeing the delays in CS5 32 bit when running the action from the Play button.

                                         

                                        -Noel