Here’s a few points to consider:
And some simple tips on speeding things up:
Also, you might be able to multithread your code:
Edit: Apologies, this is for GHPython (though the RhinoCommon points and multithreading are still valid). Hadn’t had my coffee yet 
2 Likes