I thought I'd share my experiments in this thread.
So, after upgrading from SL to Lion, it became very slow to startup and even slower to shutdown. Reading around the forums I learnt that some older applications, not compatible with Lion, were causing the shut down issues. I cleaned up a bunch of apps (using AppCleaner) and isolated the issue: HP IO Trap Monitor. This is what's causing the shutdown stalls on my system. And if I force this process to be terminated the computer shutsdown almost instantly.
You can find what causes yours to stall on shutdown by opening Finder and looking for MacintoshHD/Library/Logs/DiagnosticReports. Inside this folder you'll find several files, some of them named with DATE.ShutdownSTALL
Just sort it out by date and check which one is the most recent and start cleaning up.
I ended up having to remove the HP files from the Library/StartupItems folder. I didn't erased them, I simply moved these files onto my HP Applications folder. I might need them in case I need to print something (not sure though)
Abou the longer startup time, I finally had the courage to do a clean install.
So, by parts:
Right after I installed Lion, my startup time grew longer. After the cleanup I mentioned above, it became better, stil between 50-60 seconds since the boot chime to the login screen.
With the clean install it came down to 30 seconds. And by clean install I mean creating a bootable Lion USB drive (there's many tutorials on how to do it) booting MB Pro from the USB drive, using the disk utility to erase the MacintoshHD partition and do a fresh install of Lion. NOTE: I did this twice because at first I didn't use the disk utility to erase the partition and it simply installed it over the current install.
Result: 30 second startup from the chime to login screen.
Then I used the migration assistant and imported all my Applications from my Time Machine backup. Restarted the computer and startup was still 30 seconds. Was unable to import my user account (and all its files, folders and settings) because the one account I was doing it from had the same name and Lion said I can't replace the one that is already open and told me to create a new one and do it from there.
I created a new user account, and from the new user account I imported all my documents, settings and Home folders (300GB+), thus replacing the user account by my old one.
My startup time went back up to 50-60 seconds.
It seems that this longer startup time is either a consequence of less hard drive space (162GB free at the time) or some problem contained within my personal files and/or extra folders added to my home directory, as the startup time was not changed by the applications I had previously imported.
What are your thoughts on this? How big are your Home directories? How much free hard drive space do you have?
And just a detail, the longer startup times have NOTHING to do with the resuming of the applications from the previous session. This only makes it "slower" AFTER you enter your password and login, as you have to wait for everything to start again.