For Lightroom optimization, see: http://helpx.adobe.com/lightroom/kb/optimize-performance-lightroom.html
Here is a list of settings which has helped to make my Lightroom a lot speedier. The notes are taken from the above link.
1. Render 1:1 Previews on import or manually
On import: When "Import" is clicked, make sure the Render Previews is set to 1:1.
Manually: In the Library, select grid view. After selecting the photos to render, click Library>Preview>Render 1:1 Previews.
2. Catalog and Preview cache
Both are in the same folder buy default. Keep it that way. To see location, click Edit>Catalog Settings>File Handling. The location is set at the very first time Lightroom ever imports a file. To change the location, delete all files in the existing location. Lightroom will then prompt for location when you next import a file. To set default location, start the first import process, then click Quit before setting any new catalog location.
3. Keep standard size previews as small as possible,
but not smaller than the screen's resolution. My computer screen's highest resolution is 1280x1024. In Edit>Catalog Settings>File Handling, set Standard Preview Size to 1440, and Preview Quality to Medium or Low. Keep Automatically Discard 1:1 Previews at After 30 Days or never, but remember to delete if hard disk space starts running out.
4.Turn off Autowrite XMP
In Edit>Catalog Settings>Metadata, uncheck Automatically write changes into XMP.
5. Once in a while, optimize the catalog
Click File>Optimize Catalog...
6. Increase Camera Raw cache size.
Click Edit>Preferences>File Handling. Set Maximum Size to 20GB.
The location of the cache is also shown here.
For Photoshop optimization, see: http://helpx.adobe.com/photoshop/kb/optimize-performance-photoshop-cs4-cs5.html#main_Scratch_Disks
p/s Do a registry cleanup on the computer after changing the Catalog and Preview caches. This is important and necessary. How? Just google for "free registry cleaner".