Its been some days I have been experiencing some UI Lags, random freeze problem and over all slow interface on my iphone 4, I purchased this iphone a year back and now its was full of data, so I always thought what could be the problem and most the time I used to accuse cydia applications installed on my iphone 4.
Normally if you iphone is jailbroken and you start experiencing spring board crashes or slowness in UI response when you touch the screen on different sections it could be due to the some winterboard themes or iphone themes to tweak its UI, so you should not use winterboard if it gives you such kind of issue as ultimately it will make your phone slow.
But in my case in my case it was more worse as my iphone 4 used to show a blank screen the one you see in switched off state, and irrespective how many times I used to press home button it used to respond after some specific time of like 20-30 seconds which was very weird. Moreover some times it used to hang with some thing running on the screen and does not respond to screen touches with fingers.
Even after when I removed most the cydia UI tweaks in suspicion, then I found the two real culprits of this on my iphone. They were the two mostly used native apps on my iphone including Photos and SMS app which comes preinstalled in every iphone, in my case I had collected around 2083 photos and 36 large videos in my photos gallery, and around more than 5000 sms messages, I decided to free some space by deleting sms, videos and photos but only after backing them up on my computer by connecting iphone with data cable to my computer or the other hand if you want to backup sms messages before deleting them you can use the following software including Phone View for mac and iBackupBot for windows.
In order to delete sms messages on non jailbroken iphone you can use the above software and then delete the sms with the same applications programs mentioned above or you can also reset and erase data on iphone, but make sure you do it only when you have full backup of your non jailbroken iphone.
For Jailbroken iphone users this is quite simple and easy as there is free application on cydia named clear all sms which allows you to delete all sms messages just by launching the app once installed from cydia.
After deleting all the sms and most of the photos and videos on my iphone, my iphone 4 got a new life and it become much responsive and speedy, It could be a specific case but it solved my problem. Let me know if the same works for you.