I just figured out why my iPhone 3GS is glitchy/lags/slow after the ios 4 update. It’s due to the number of multitask apps open. If you double tap the home button, you will see all the apps available for quick switching at the bottom of the screen. Scroll sideways to view them all. Click and hold one of the app icons and close out all the ones that you do not need. Seems like my iPhone doesn’t have enough memory to handle all these open apps. Apple needs to come out with a setting that allows you to set the number of open multitask apps.