What are you running now? If upgrading, I'm assuming Snow Leopard. If so, DON'T until you fix the slowness issue. See:
Mac Maintenance Quick Assist,
Mac OS X speed FAQ,
Speeding up Macs,
How to Speed up Macs, ,
Macintosh OS X Routine Maintenance,
Essential Mac Maintenance: Get set up,
Essential Mac Maintenance: Rev up your routines,
Maintaining OS X,
Five Mac maintenance myths and
Myths of required versus not required maintenance for Mac OS X for information.
Then, you're running OS X 10.7.4. if you failed to retain a bootable backup/clone of your previous Snow Leopard (10.6) installation, then you're probably stuck with Lion, unless you reinstall SL onto an empty volume, boot with it, and reinstall the apps and reset your user and network settings. See Kappy's going back to SL from Lion guide or ds store's How to revert your Mac to Snow Leopardguide for more details. Otherwise, fix the 10.7.4 volume following the steps in the articles I mentioned above.