ell, five months after buying my new computer and two months after buying Sonar X2 studio, I thought I finally had things up and running and figured out, and could try actually recording something. Silly me!!
Latency comes from two sources... and only two sources.
Set the ASIO buffer size as low as possible for minimal round-trip latency.
Better audio interfaces provide lower round-trip latency.
ie: The best units yield ~5ms total round-trip latency at a 64-sample ASIO buffer size/44.1k.
Plugins that use look-ahead processing (often "mastering" types of EQ/Dynamics), convolution reverb, etc... add additional latency.
If they're inserted ANYWHERE in the project, Sonar delays all other audio (by an equal amount) to maintain sample-accurate sync. This is referred to as Plugin Delay Compensation.
When tracking, avoid using latent plugins... or in the Control Bar, use the global PDC bypass when tracking (making sure to re-enable it when you've finished).
There is no other source of latency. IOW, Sonar itself is not a source of the 3-second latency to which you refer.
As far as glitches/etc, that's down to the configuration of your new machine.
Step back, take a breath, and think about the situation in a non-emotion manner.
You've just got a bunch of new gear.
With that gear comes a steep learning curve.
You're not going to master these things immediately (no different that trying to pickup a new instrument and expect to be playing like a virtuoso in short order).
First, I'd check your machine's DPC latency... and make sure it's performing well on a fundamental level.
Start with a rock-solid foundation (rock-solid machine)... and move out from there (software, plugins, etc).