Array of extruded shapes is too slow

Thank you,

emptying the list each time does not improve the situation, is there a more efficient strategy to solve the problem?