hi gabriel -
without going into details, i had a quick look at your code, and for me it looks well written and nothing obvious which can be optimized.
the main question for me is why you use csoundqt in this constellaion. if you run csound in terminal, you would certainly gain stability and performance. we always had some CPU bottlenecks in csoundqt. i nevertheless run some complex csd in csoundqt because i need the widgets (and it works), but as i said, i think for you it is different.
best -
joachim