Adobe Flash is not a virus but Flash content is very resource-hungry. Flash developers don't know or care about your hardware or bandwidth, both of which have limitations. Buying a new computer simply so that you can look at Flash-based advertisements makes little sense to me. Just avoid sites that use Flash.
There are no viruses for Mac OS X. Keep it updated with software from Apple using Software Update. Without a more specific description of your hardware, the amount of memory you have installed, what third party system modifications you may have made, and what version of Mac OS X you are using, it is difficult to provide more specific guidance than that.
Read the following to determine if something may apply to your concern:
Do not download or install any product claiming to magically "clean up" or "speed up" or "optimize" your Mac. Without exception, they will do the opposite. If you already did, you found the problem. Fix it.
If you're experiencing general slowdowns or "freezes" unrelated to Internet activity, the problem may be related to your computer or the software you installed and is something you may be able to fix, or at least improve. Aside from hardware failures and software that you install, including OS upgrades, there is no reason that your computer should not work precisely the same as it did when it was new.
General Mac maintenance: Tips to keep your Mac in top form
General purpose Mac troubleshooting guide: Isolating issues in Mac OS X
Creating a temporary account to isolate user-specific problems: Isolating an issue by using another user account
Identifying resource hogs and other tips: Runaway applications can shorten battery runtime
To identify potential hardware problems: Apple Hardware Test
To resolve startup issues and perform disk maintenance, use Disk Utility.
Safe Mode or "Safe Boot" is a troubleshooting mode that bypasses all third party system extensions and loads only required system components.
Read about it: Starting up in Safe Mode
To repair a potentially corrupt hard disk, so that you may recover its data prior to replacing it, and subsequently reinstall Mac OS X: OS X Recovery (applies only to Lion and later versions of OS X)