by Julieanne Kost
• Command + Z (Mac) | Control + Z (Win) will toggle undo/redo of the last command.
• Option + Command + Z (Mac) | Alt + Control + Z (Win) will step you back through history.
• Command + Shift + Z (Mac) | Control + Shift + Z (Win) will step you forward through history.
To change the number of history states (multiple undo’s) that Photoshop keeps track of while an image is open, select Preferences > Performance and enter a value for History States. Setting a higher number (100 for example) will save more changes, and allow you to step farther back in time, however it will also require Photoshop to keep track of more information in RAM (or, when all of the RAM is in use, using the scratch disk). Making large changes to the entire document (adding layers, running filters etc.), requires keeping track of more history than smaller changes (such as small, localized strokes with the Healing Brush). Therefore, if you increase the number of states and notice a performance hit, trying lowering the number again.
You can also manually set the Cache Levels and Cache Tile Size in the Performance Preferences. If you use relatively small files—roughly 1 megapixel or 1280 by 1024 pixels—and many layers (50 or more), set Cache Levels to 1 or 2. Setting Cache Levels to 1 disables image caching; only the current screen image is cached (however, you may not get high-quality results with some Photoshop features if you set Cache Levels to 1). If you use files with larger pixel dimensions—say, 50 megapixels or larger—set Cache Levels higher than 4. Higher cache levels speed up redrawing.
Click here for more information about optimizing Photoshop’s performance. https://helpx.adobe.com/photoshop/kb/optimize-photoshop-cc-performance.html