Here's an optimised version: https://www.dropbox.com/s/ps1bfsng4fvl8vt/test007-opt.c3p?dl=0
This only supports middle click to spawn and then A & D to rotate (it's quite a big project and I don't have time to go through it all). The key is:
- use family instead of a container, with family variables for the base position and "sliceframe"
- pick using IIDs upon creation to make sure the family variables have the right base position set (this is a little awkward especially since it has to use a next-top-level-event after creation, but it only needs to be done once in this demo)
- save unchanging parts of the expression in to local variables
Then updating the position can be reduced to a single 'Set position' on the family with:
X: Self.FBaseX + (Self.FSliceFrame + zmultiplied) * cosLayoutAngle
Y: Self.FBaseY + (Self.FSliceFrame * zmultiplied) * sinLayoutAngle
Testing with 3000 car objects - which is a total of 36,000 objects to update - my results are:
Original project:
C2 runtime: 17 FPS
C3 runtime: 34 FPS
Optimised project:
C2 runtime: 23 FPS
C3 runtime: 60 FPS
So despite there being tens of thousands of objects to update, the optimised project + C3 runtime can hit 60 FPS (on my system, at least).