Another thing of note is that the number of "Undo histories" you have will consume RAM, and that is set to 128 by default. In order to change it (ironically), you need to first make a change to a project, then Edit->History... (3rd option down). At the bottom of that popup is a "Maximum Undo Levels." Set that to a reasonable number (I use 10). You can also manually clear the undo history there (your Melodyne usage is also stored here, so even bouncing only does so much... something to bear in mind if you are a heavy Melodyne user (there is no rehab for this yet)).
Using small Melodyne Region FX, bouncing Melodyne edits promptly, saving the cwp fairly often, and minimizing (or even clearing) undo history will alleviate a lot of the overhead that SONAR is dealing with in the background as you are editing with Melodyne.