This can happen when the engine you are using is competing with Sonar for resources. For example, make sure you have the samples on a separate drive from the project's audio, or use very fast disks like SSD's. Also, most of these libraries make great use of RAM, so add as much as you can. Lastly, if your project is at a different sample rate than the library, there is some conversion taking place as the samples are streamed. This also contributes to the problem.
In general, I try to bounce tracks as soon as I can to free up resources. I archive the midi and unload the patch/synth. If I have modified the patch, I save it as a preset with the project itself.
Regards,
Dan