What I have also forgot to add is, that the fact that the Render procedure is called many times, and I palced a lot of sin/cos calculations in there too, making the results very slow. I've also discovered OnSetRenderInfo which was supposed to be ran one time only, but I'm not too sure how it works, and where it's placed.
I did look at source codes to other plugins, but I must assume that's it's more of an older version of the code.