I have checked your definition. This is the problem and how to solve it:
Meshes to be displayed using WebGL can not have more than 65536 vertices (2 byte integer limit, which is used for vertex indices). If you output a mesh that has more than 65536 vertices, we have to decimate it, which takes time and therefore will likely cause computation time to exceed the 5s limit.
Solution: output meshes which have less than 65536 vertices. We automatically group such meshes into packages of max 65536 vertices, such that the number of meshes is minimised. In your simple don’t do a global merge of vertices, but just per module.
Use the components of the ShapeDiver plugin to display geometry, and switch of Preview for all other components. This will provide you with control on the material settings.
In your example the same module is displayed many times. We have a possibility which allows you to do this in a much more efficient way, similar to block definitions. When using the ShapeDiver display components, you can define transformations. This will radically lower transfer size and time for your example. The details will be documented on our reworked upcoming website, attached you can find a simple example on how to use it. TransformationTest.gh (12.1 KB)